sealos-cli 0.1.0 → 1.1.0
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/README.md +77 -76
- package/dist/bin/cli.cjs +5120 -775
- package/dist/bin/cli.mjs +5120 -775
- package/dist/main.cjs +5116 -775
- package/dist/main.mjs +5120 -775
- package/package.json +6 -5
- package/src/commands/app/index.ts +5 -4
- package/src/commands/database/index.ts +12 -12
- package/src/commands/devbox/index.ts +676 -183
- package/src/commands/quota/index.ts +4 -3
- package/src/commands/s3/index.ts +5 -5
- package/src/commands/template/index.ts +107 -41
- package/src/commands/workspace/index.ts +49 -39
- package/src/docs/database_openapi.json +21 -38
- package/src/docs/devbox_openapi.json +5760 -0
- package/src/docs/template_openapi.json +2661 -1
- package/src/generated/database.ts +1 -5
- package/src/generated/devbox.ts +2500 -0
- package/src/generated/template.ts +228 -0
- package/src/lib/api-client.ts +19 -1
- package/src/lib/auth.ts +17 -8
- package/src/lib/errors.ts +1 -1
- package/src/lib/output.ts +5 -6
- package/src/main.ts +4 -11
- package/src/types/index.ts +0 -12
- package/src/commands/config/index.ts +0 -54
- package/src/lib/api.ts +0 -83
- package/src/lib/config.ts +0 -134
|
@@ -0,0 +1,2500 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/devbox": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* List all devboxes
|
|
16
|
+
* @description Retrieve all Devbox instances in the current namespace with resource and runtime information.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["listDevboxes"];
|
|
19
|
+
put?: never;
|
|
20
|
+
/**
|
|
21
|
+
* Create a new devbox
|
|
22
|
+
* @description Create a new Devbox instance with the specified runtime, resources, and network ports. CPU and memory quota must be in the range [0.1, 32].
|
|
23
|
+
*/
|
|
24
|
+
post: operations["createDevbox"];
|
|
25
|
+
delete?: never;
|
|
26
|
+
options?: never;
|
|
27
|
+
head?: never;
|
|
28
|
+
patch?: never;
|
|
29
|
+
trace?: never;
|
|
30
|
+
};
|
|
31
|
+
"/devbox/{name}": {
|
|
32
|
+
parameters: {
|
|
33
|
+
query?: never;
|
|
34
|
+
header?: never;
|
|
35
|
+
path?: never;
|
|
36
|
+
cookie?: never;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Get devbox details
|
|
40
|
+
* @description Retrieve complete configuration, runtime status, SSH connection information, ports, and pod list for a specific Devbox.
|
|
41
|
+
*/
|
|
42
|
+
get: operations["getDevbox"];
|
|
43
|
+
put?: never;
|
|
44
|
+
post?: never;
|
|
45
|
+
/**
|
|
46
|
+
* Delete a devbox
|
|
47
|
+
* @description Delete a Devbox and all associated resources (services, ingress rules, certificates, persistent volumes).
|
|
48
|
+
*
|
|
49
|
+
* Key points:
|
|
50
|
+
* - **Idempotent** — if the Devbox does not exist the request still returns `204`.
|
|
51
|
+
*/
|
|
52
|
+
delete: operations["deleteDevbox"];
|
|
53
|
+
options?: never;
|
|
54
|
+
head?: never;
|
|
55
|
+
/**
|
|
56
|
+
* Update devbox configuration
|
|
57
|
+
* @description Update Devbox resource quota and/or port configuration. CPU and memory quota must be in the range [0.1, 32].
|
|
58
|
+
*
|
|
59
|
+
* Key points:
|
|
60
|
+
* - At least one of `quota` or `ports` must be provided.
|
|
61
|
+
* - To update an existing port supply its `portName`. To add a new port omit `portName`.
|
|
62
|
+
* - Ports not present in the `ports` array are deleted.
|
|
63
|
+
*/
|
|
64
|
+
patch: operations["updateDevbox"];
|
|
65
|
+
trace?: never;
|
|
66
|
+
};
|
|
67
|
+
"/devbox/{name}/autostart": {
|
|
68
|
+
parameters: {
|
|
69
|
+
query?: never;
|
|
70
|
+
header?: never;
|
|
71
|
+
path?: never;
|
|
72
|
+
cookie?: never;
|
|
73
|
+
};
|
|
74
|
+
get?: never;
|
|
75
|
+
put?: never;
|
|
76
|
+
/**
|
|
77
|
+
* Configure devbox autostart
|
|
78
|
+
* @description Configure the command that runs automatically when the Devbox starts. If `execCommand` is omitted the default template entrypoint is used.
|
|
79
|
+
*/
|
|
80
|
+
post: operations["autostartDevbox"];
|
|
81
|
+
delete?: never;
|
|
82
|
+
options?: never;
|
|
83
|
+
head?: never;
|
|
84
|
+
patch?: never;
|
|
85
|
+
trace?: never;
|
|
86
|
+
};
|
|
87
|
+
"/devbox/{name}/start": {
|
|
88
|
+
parameters: {
|
|
89
|
+
query?: never;
|
|
90
|
+
header?: never;
|
|
91
|
+
path?: never;
|
|
92
|
+
cookie?: never;
|
|
93
|
+
};
|
|
94
|
+
get?: never;
|
|
95
|
+
put?: never;
|
|
96
|
+
/**
|
|
97
|
+
* Start a devbox
|
|
98
|
+
* @description Start a paused or stopped Devbox and restore its network ingress rules to active state.
|
|
99
|
+
*
|
|
100
|
+
* Key points:
|
|
101
|
+
* - **Idempotent** — calling start on an already-running Devbox returns `204`.
|
|
102
|
+
*/
|
|
103
|
+
post: operations["startDevbox"];
|
|
104
|
+
delete?: never;
|
|
105
|
+
options?: never;
|
|
106
|
+
head?: never;
|
|
107
|
+
patch?: never;
|
|
108
|
+
trace?: never;
|
|
109
|
+
};
|
|
110
|
+
"/devbox/{name}/pause": {
|
|
111
|
+
parameters: {
|
|
112
|
+
query?: never;
|
|
113
|
+
header?: never;
|
|
114
|
+
path?: never;
|
|
115
|
+
cookie?: never;
|
|
116
|
+
};
|
|
117
|
+
get?: never;
|
|
118
|
+
put?: never;
|
|
119
|
+
/**
|
|
120
|
+
* Pause a devbox
|
|
121
|
+
* @description Pause a Devbox to stop its compute resources while preserving port allocations, reducing costs.
|
|
122
|
+
*
|
|
123
|
+
* Key points:
|
|
124
|
+
* - **Idempotent** — calling pause on an already-paused Devbox returns `204`.
|
|
125
|
+
*/
|
|
126
|
+
post: operations["pauseDevbox"];
|
|
127
|
+
delete?: never;
|
|
128
|
+
options?: never;
|
|
129
|
+
head?: never;
|
|
130
|
+
patch?: never;
|
|
131
|
+
trace?: never;
|
|
132
|
+
};
|
|
133
|
+
"/devbox/{name}/shutdown": {
|
|
134
|
+
parameters: {
|
|
135
|
+
query?: never;
|
|
136
|
+
header?: never;
|
|
137
|
+
path?: never;
|
|
138
|
+
cookie?: never;
|
|
139
|
+
};
|
|
140
|
+
get?: never;
|
|
141
|
+
put?: never;
|
|
142
|
+
/**
|
|
143
|
+
* Shutdown a devbox
|
|
144
|
+
* @description Completely shut down a Devbox, releasing all compute resources and port allocations to minimise costs.
|
|
145
|
+
*/
|
|
146
|
+
post: operations["shutdownDevbox"];
|
|
147
|
+
delete?: never;
|
|
148
|
+
options?: never;
|
|
149
|
+
head?: never;
|
|
150
|
+
patch?: never;
|
|
151
|
+
trace?: never;
|
|
152
|
+
};
|
|
153
|
+
"/devbox/{name}/restart": {
|
|
154
|
+
parameters: {
|
|
155
|
+
query?: never;
|
|
156
|
+
header?: never;
|
|
157
|
+
path?: never;
|
|
158
|
+
cookie?: never;
|
|
159
|
+
};
|
|
160
|
+
get?: never;
|
|
161
|
+
put?: never;
|
|
162
|
+
/**
|
|
163
|
+
* Restart a devbox
|
|
164
|
+
* @description Trigger a complete restart cycle: stop all pods, wait for termination, restore ingress, then start the Devbox.
|
|
165
|
+
*
|
|
166
|
+
* Key points:
|
|
167
|
+
* - **Idempotent** — always triggers a restart regardless of the current state.
|
|
168
|
+
*/
|
|
169
|
+
post: operations["restartDevbox"];
|
|
170
|
+
delete?: never;
|
|
171
|
+
options?: never;
|
|
172
|
+
head?: never;
|
|
173
|
+
patch?: never;
|
|
174
|
+
trace?: never;
|
|
175
|
+
};
|
|
176
|
+
"/devbox/{name}/releases": {
|
|
177
|
+
parameters: {
|
|
178
|
+
query?: never;
|
|
179
|
+
header?: never;
|
|
180
|
+
path?: never;
|
|
181
|
+
cookie?: never;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* List devbox releases
|
|
185
|
+
* @description Retrieve all release versions for a Devbox, ordered by creation time descending.
|
|
186
|
+
*/
|
|
187
|
+
get: operations["listDevboxReleases"];
|
|
188
|
+
put?: never;
|
|
189
|
+
/**
|
|
190
|
+
* Create a devbox release
|
|
191
|
+
* @description Snapshot the current Devbox state and trigger a container image build for the given version tag.
|
|
192
|
+
*
|
|
193
|
+
* Key points:
|
|
194
|
+
* - **Asynchronous** — returns `202 Accepted` immediately. The build pipeline (stop devbox → build image → restart devbox) runs in the background; poll `GET /devbox/{name}/releases` to track progress.
|
|
195
|
+
* - By default the Devbox is restarted after the build succeeds (`startDevboxAfterRelease: true`). Set to `false` to keep the Devbox stopped after the release.
|
|
196
|
+
*/
|
|
197
|
+
post: operations["createDevboxRelease"];
|
|
198
|
+
delete?: never;
|
|
199
|
+
options?: never;
|
|
200
|
+
head?: never;
|
|
201
|
+
patch?: never;
|
|
202
|
+
trace?: never;
|
|
203
|
+
};
|
|
204
|
+
"/devbox/{name}/deployments": {
|
|
205
|
+
parameters: {
|
|
206
|
+
query?: never;
|
|
207
|
+
header?: never;
|
|
208
|
+
path?: never;
|
|
209
|
+
cookie?: never;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* List deployed applications from a devbox
|
|
213
|
+
* @description Retrieve all AppLaunchpad applications that were deployed from this Devbox's releases.
|
|
214
|
+
*/
|
|
215
|
+
get: operations["listDevboxDeployments"];
|
|
216
|
+
put?: never;
|
|
217
|
+
post?: never;
|
|
218
|
+
delete?: never;
|
|
219
|
+
options?: never;
|
|
220
|
+
head?: never;
|
|
221
|
+
patch?: never;
|
|
222
|
+
trace?: never;
|
|
223
|
+
};
|
|
224
|
+
"/devbox/{name}/releases/{tag}": {
|
|
225
|
+
parameters: {
|
|
226
|
+
query?: never;
|
|
227
|
+
header?: never;
|
|
228
|
+
path?: never;
|
|
229
|
+
cookie?: never;
|
|
230
|
+
};
|
|
231
|
+
get?: never;
|
|
232
|
+
put?: never;
|
|
233
|
+
post?: never;
|
|
234
|
+
/**
|
|
235
|
+
* Delete a devbox release
|
|
236
|
+
* @description Delete a specific release version and its associated container image.
|
|
237
|
+
*
|
|
238
|
+
* Key points:
|
|
239
|
+
* - **Idempotent** — if the release does not exist the request still returns `204`.
|
|
240
|
+
*/
|
|
241
|
+
delete: operations["deleteDevboxRelease"];
|
|
242
|
+
options?: never;
|
|
243
|
+
head?: never;
|
|
244
|
+
patch?: never;
|
|
245
|
+
trace?: never;
|
|
246
|
+
};
|
|
247
|
+
"/devbox/{name}/releases/{tag}/deploy": {
|
|
248
|
+
parameters: {
|
|
249
|
+
query?: never;
|
|
250
|
+
header?: never;
|
|
251
|
+
path?: never;
|
|
252
|
+
cookie?: never;
|
|
253
|
+
};
|
|
254
|
+
get?: never;
|
|
255
|
+
put?: never;
|
|
256
|
+
/**
|
|
257
|
+
* Deploy a release to AppLaunchpad
|
|
258
|
+
* @description Deploy a successfully built release version as a production application in AppLaunchpad.
|
|
259
|
+
*
|
|
260
|
+
* Key points:
|
|
261
|
+
* - The release must be in `Success` status before deploying.
|
|
262
|
+
* - Each call creates a new AppLaunchpad application; prior deployments are not replaced.
|
|
263
|
+
*/
|
|
264
|
+
post: operations["deployDevboxRelease"];
|
|
265
|
+
delete?: never;
|
|
266
|
+
options?: never;
|
|
267
|
+
head?: never;
|
|
268
|
+
patch?: never;
|
|
269
|
+
trace?: never;
|
|
270
|
+
};
|
|
271
|
+
"/devbox/{name}/monitor": {
|
|
272
|
+
parameters: {
|
|
273
|
+
query?: never;
|
|
274
|
+
header?: never;
|
|
275
|
+
path?: never;
|
|
276
|
+
cookie?: never;
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Get devbox monitoring data
|
|
280
|
+
* @description Retrieve time-series CPU and memory usage metrics for a specific Devbox.
|
|
281
|
+
*/
|
|
282
|
+
get: operations["getDevboxMonitor"];
|
|
283
|
+
put?: never;
|
|
284
|
+
post?: never;
|
|
285
|
+
delete?: never;
|
|
286
|
+
options?: never;
|
|
287
|
+
head?: never;
|
|
288
|
+
patch?: never;
|
|
289
|
+
trace?: never;
|
|
290
|
+
};
|
|
291
|
+
"/devbox/templates": {
|
|
292
|
+
parameters: {
|
|
293
|
+
query?: never;
|
|
294
|
+
header?: never;
|
|
295
|
+
path?: never;
|
|
296
|
+
cookie?: never;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* List available devbox templates
|
|
300
|
+
* @description Retrieve available runtime environments and their default port/command configurations for creating Devboxes.
|
|
301
|
+
*/
|
|
302
|
+
get: operations["listDevboxTemplates"];
|
|
303
|
+
put?: never;
|
|
304
|
+
post?: never;
|
|
305
|
+
delete?: never;
|
|
306
|
+
options?: never;
|
|
307
|
+
head?: never;
|
|
308
|
+
patch?: never;
|
|
309
|
+
trace?: never;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
export type webhooks = Record<string, never>;
|
|
313
|
+
export interface components {
|
|
314
|
+
schemas: never;
|
|
315
|
+
responses: never;
|
|
316
|
+
parameters: never;
|
|
317
|
+
requestBodies: never;
|
|
318
|
+
headers: never;
|
|
319
|
+
pathItems: never;
|
|
320
|
+
}
|
|
321
|
+
export type $defs = Record<string, never>;
|
|
322
|
+
export interface operations {
|
|
323
|
+
listDevboxes: {
|
|
324
|
+
parameters: {
|
|
325
|
+
query?: never;
|
|
326
|
+
header?: never;
|
|
327
|
+
path?: never;
|
|
328
|
+
cookie?: never;
|
|
329
|
+
};
|
|
330
|
+
requestBody?: never;
|
|
331
|
+
responses: {
|
|
332
|
+
/** @description Devbox list retrieved successfully. */
|
|
333
|
+
200: {
|
|
334
|
+
headers: {
|
|
335
|
+
[name: string]: unknown;
|
|
336
|
+
};
|
|
337
|
+
content: {
|
|
338
|
+
"application/json": {
|
|
339
|
+
/** @description Devbox name */
|
|
340
|
+
name: string;
|
|
341
|
+
/** @description Devbox UID */
|
|
342
|
+
uid: string;
|
|
343
|
+
/**
|
|
344
|
+
* @description Resource type
|
|
345
|
+
* @default devbox
|
|
346
|
+
*/
|
|
347
|
+
resourceType: string;
|
|
348
|
+
/** @description Runtime environment (e.g., go, python, node.js) */
|
|
349
|
+
runtime: string;
|
|
350
|
+
/**
|
|
351
|
+
* @description Devbox status (pending, running, stopped, error)
|
|
352
|
+
* @enum {string}
|
|
353
|
+
*/
|
|
354
|
+
status: "pending" | "running" | "stopped" | "error";
|
|
355
|
+
/** @description Resource quota allocation */
|
|
356
|
+
quota: {
|
|
357
|
+
/** @description CPU in cores (e.g., 1.0 = 1 core) */
|
|
358
|
+
cpu: number;
|
|
359
|
+
/** @description Memory in GB (e.g., 2.0 = 2GB) */
|
|
360
|
+
memory: number;
|
|
361
|
+
};
|
|
362
|
+
}[];
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
366
|
+
401: {
|
|
367
|
+
headers: {
|
|
368
|
+
[name: string]: unknown;
|
|
369
|
+
};
|
|
370
|
+
content: {
|
|
371
|
+
"application/json": {
|
|
372
|
+
error: {
|
|
373
|
+
/** @constant */
|
|
374
|
+
type: "authentication_error";
|
|
375
|
+
/** @constant */
|
|
376
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
377
|
+
message: string;
|
|
378
|
+
details?: string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
/** @description Failed to retrieve the devbox list. */
|
|
384
|
+
500: {
|
|
385
|
+
headers: {
|
|
386
|
+
[name: string]: unknown;
|
|
387
|
+
};
|
|
388
|
+
content: {
|
|
389
|
+
"application/json": {
|
|
390
|
+
error: {
|
|
391
|
+
/** @enum {string} */
|
|
392
|
+
type: "internal_error";
|
|
393
|
+
/** @enum {string} */
|
|
394
|
+
code: "INTERNAL_ERROR";
|
|
395
|
+
message: string;
|
|
396
|
+
details?: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
createDevbox: {
|
|
404
|
+
parameters: {
|
|
405
|
+
query?: never;
|
|
406
|
+
header?: never;
|
|
407
|
+
path?: never;
|
|
408
|
+
cookie?: never;
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* @description Devbox creation parameters.
|
|
412
|
+
*
|
|
413
|
+
* **Example — Python devbox with a public HTTP port:**
|
|
414
|
+
* ```json
|
|
415
|
+
* {
|
|
416
|
+
* "name": "my-python-api",
|
|
417
|
+
* "runtime": "python",
|
|
418
|
+
* "quota": { "cpu": 1, "memory": 2 },
|
|
419
|
+
* "ports": [{ "number": 8080, "protocol": "http", "isPublic": true }],
|
|
420
|
+
* "env": [],
|
|
421
|
+
* "autostart": false
|
|
422
|
+
* }
|
|
423
|
+
* ```
|
|
424
|
+
*
|
|
425
|
+
* **Example — Go devbox with environment variables and autostart:**
|
|
426
|
+
* ```json
|
|
427
|
+
* {
|
|
428
|
+
* "name": "my-go-service",
|
|
429
|
+
* "runtime": "go",
|
|
430
|
+
* "quota": { "cpu": 0.5, "memory": 1 },
|
|
431
|
+
* "ports": [],
|
|
432
|
+
* "env": [{ "name": "GO_ENV", "value": "development" }],
|
|
433
|
+
* "autostart": true
|
|
434
|
+
* }
|
|
435
|
+
* ```
|
|
436
|
+
*
|
|
437
|
+
* **Example — minimal resources (floor values):**
|
|
438
|
+
* ```json
|
|
439
|
+
* {
|
|
440
|
+
* "name": "my-minimal-devbox",
|
|
441
|
+
* "runtime": "node.js",
|
|
442
|
+
* "quota": { "cpu": 0.1, "memory": 0.1 },
|
|
443
|
+
* "ports": [],
|
|
444
|
+
* "env": [],
|
|
445
|
+
* "autostart": false
|
|
446
|
+
* }
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
requestBody: {
|
|
450
|
+
content: {
|
|
451
|
+
"application/json": {
|
|
452
|
+
/** @description Devbox name (must be DNS compliant: lowercase, numbers, hyphens, 1-63 chars) */
|
|
453
|
+
name: string;
|
|
454
|
+
/**
|
|
455
|
+
* @description Runtime environment name
|
|
456
|
+
* @enum {string}
|
|
457
|
+
*/
|
|
458
|
+
runtime: "nuxt3" | "angular" | "quarkus" | "ubuntu" | "flask" | "java" | "chi" | "net" | "iris" | "hexo" | "python" | "docusaurus" | "vitepress" | "cpp" | "vue" | "nginx" | "rocket" | "debian-ssh" | "vert.x" | "express.js" | "django" | "next.js" | "sealaf" | "go" | "react" | "php" | "svelte" | "c" | "astro" | "umi" | "gin" | "node.js" | "echo" | "claude-code" | "rust";
|
|
459
|
+
/** @description Resource allocation for CPU and memory */
|
|
460
|
+
quota: {
|
|
461
|
+
/**
|
|
462
|
+
* @description CPU allocation in cores
|
|
463
|
+
* @example 1
|
|
464
|
+
*/
|
|
465
|
+
cpu: number;
|
|
466
|
+
/**
|
|
467
|
+
* @description Memory allocation in GB
|
|
468
|
+
* @example 2
|
|
469
|
+
*/
|
|
470
|
+
memory: number;
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* @description Port configurations (optional, can be empty)
|
|
474
|
+
* @default []
|
|
475
|
+
*/
|
|
476
|
+
ports?: {
|
|
477
|
+
/** @description Port number (1-65535) */
|
|
478
|
+
number: number;
|
|
479
|
+
/**
|
|
480
|
+
* @description Protocol type, defaults to HTTP
|
|
481
|
+
* @default http
|
|
482
|
+
* @enum {string}
|
|
483
|
+
*/
|
|
484
|
+
protocol?: "http" | "grpc" | "ws";
|
|
485
|
+
/**
|
|
486
|
+
* @description Enable public domain access, defaults to true
|
|
487
|
+
* @default true
|
|
488
|
+
*/
|
|
489
|
+
isPublic?: boolean;
|
|
490
|
+
/** @description Custom domain (optional) */
|
|
491
|
+
customDomain?: string;
|
|
492
|
+
}[];
|
|
493
|
+
/**
|
|
494
|
+
* @description Environment variables (optional, can be empty)
|
|
495
|
+
* @default []
|
|
496
|
+
*/
|
|
497
|
+
env?: {
|
|
498
|
+
/** @description Environment variable name */
|
|
499
|
+
name: string;
|
|
500
|
+
/** @description Environment variable value */
|
|
501
|
+
value?: string;
|
|
502
|
+
/** @description Source for the environment variable value */
|
|
503
|
+
valueFrom?: {
|
|
504
|
+
secretKeyRef: {
|
|
505
|
+
/** @description Secret key */
|
|
506
|
+
key: string;
|
|
507
|
+
/** @description Secret name */
|
|
508
|
+
name: string;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
}[];
|
|
512
|
+
/**
|
|
513
|
+
* @description Auto start devbox after creation (defaults to false)
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
516
|
+
autostart?: boolean;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
responses: {
|
|
521
|
+
/** @description Devbox created. SSH connection details (port, private key, domain) are provisioned synchronously and returned in this response. The container pod starts asynchronously — poll `GET /devbox/{name}` until `status` is `running` before establishing an SSH connection. */
|
|
522
|
+
201: {
|
|
523
|
+
headers: {
|
|
524
|
+
[name: string]: unknown;
|
|
525
|
+
};
|
|
526
|
+
content: {
|
|
527
|
+
"application/json": {
|
|
528
|
+
/**
|
|
529
|
+
* @description Devbox name
|
|
530
|
+
* @example my-python-api
|
|
531
|
+
*/
|
|
532
|
+
name: string;
|
|
533
|
+
/**
|
|
534
|
+
* @description SSH node port for connecting to the Devbox
|
|
535
|
+
* @example 40001
|
|
536
|
+
*/
|
|
537
|
+
sshPort: number;
|
|
538
|
+
/**
|
|
539
|
+
* @description Base64-encoded SSH private key. Decode before use.
|
|
540
|
+
* @example LS0tLS1CRUdJTi...
|
|
541
|
+
*/
|
|
542
|
+
base64PrivateKey: string;
|
|
543
|
+
/**
|
|
544
|
+
* @description SSH login username
|
|
545
|
+
* @example devbox
|
|
546
|
+
*/
|
|
547
|
+
userName: string;
|
|
548
|
+
/**
|
|
549
|
+
* @description Default working directory inside the Devbox
|
|
550
|
+
* @example /home/devbox/project
|
|
551
|
+
*/
|
|
552
|
+
workingDir: string;
|
|
553
|
+
/**
|
|
554
|
+
* @description Base domain of the Sealos instance
|
|
555
|
+
* @example cloud.sealos.io
|
|
556
|
+
*/
|
|
557
|
+
domain?: string;
|
|
558
|
+
/** @description Created port configurations (may be empty) */
|
|
559
|
+
ports: {
|
|
560
|
+
/** @description Generated port name */
|
|
561
|
+
portName: string;
|
|
562
|
+
/** @description Port number */
|
|
563
|
+
number: number;
|
|
564
|
+
/**
|
|
565
|
+
* @description Protocol type
|
|
566
|
+
* @enum {string}
|
|
567
|
+
*/
|
|
568
|
+
protocol: "http" | "grpc" | "ws";
|
|
569
|
+
/** @description Network/Ingress name */
|
|
570
|
+
networkName: string;
|
|
571
|
+
/** @description Whether public domain is enabled */
|
|
572
|
+
isPublic: boolean;
|
|
573
|
+
/** @description Generated public domain */
|
|
574
|
+
publicDomain: string;
|
|
575
|
+
/** @description Custom domain (if provided) */
|
|
576
|
+
customDomain: string;
|
|
577
|
+
/** @description Service name */
|
|
578
|
+
serviceName: string;
|
|
579
|
+
/** @description Private address for internal access */
|
|
580
|
+
privateAddress: string;
|
|
581
|
+
/** @description Error message if port creation failed */
|
|
582
|
+
error?: string;
|
|
583
|
+
}[];
|
|
584
|
+
/** @description Whether the autostart job was triggered (`autostart: true` in request) */
|
|
585
|
+
autostarted?: boolean;
|
|
586
|
+
/** @description Ports that failed to be created (only present when partial failure occurred) */
|
|
587
|
+
portErrors?: {
|
|
588
|
+
/** @description Port number that failed */
|
|
589
|
+
port: number;
|
|
590
|
+
/** @description Error message */
|
|
591
|
+
error: string;
|
|
592
|
+
}[];
|
|
593
|
+
/** @description Aggregate counts for port creation */
|
|
594
|
+
summary: {
|
|
595
|
+
/** @description Total number of ports */
|
|
596
|
+
totalPorts: number;
|
|
597
|
+
/** @description Number of successfully created ports */
|
|
598
|
+
successfulPorts: number;
|
|
599
|
+
/** @description Number of failed ports */
|
|
600
|
+
failedPorts: number;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
/** @description Request body failed validation. */
|
|
606
|
+
400: {
|
|
607
|
+
headers: {
|
|
608
|
+
[name: string]: unknown;
|
|
609
|
+
};
|
|
610
|
+
content: {
|
|
611
|
+
"application/json": {
|
|
612
|
+
error: {
|
|
613
|
+
/** @enum {string} */
|
|
614
|
+
type: "validation_error";
|
|
615
|
+
/** @enum {string} */
|
|
616
|
+
code: "INVALID_PARAMETER";
|
|
617
|
+
message: string;
|
|
618
|
+
details?: {
|
|
619
|
+
field: string;
|
|
620
|
+
message: string;
|
|
621
|
+
}[] | string;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
627
|
+
401: {
|
|
628
|
+
headers: {
|
|
629
|
+
[name: string]: unknown;
|
|
630
|
+
};
|
|
631
|
+
content: {
|
|
632
|
+
"application/json": {
|
|
633
|
+
error: {
|
|
634
|
+
/** @constant */
|
|
635
|
+
type: "authentication_error";
|
|
636
|
+
/** @constant */
|
|
637
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
638
|
+
message: string;
|
|
639
|
+
details?: string;
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
/** @description The specified runtime does not exist or is not available. */
|
|
645
|
+
404: {
|
|
646
|
+
headers: {
|
|
647
|
+
[name: string]: unknown;
|
|
648
|
+
};
|
|
649
|
+
content: {
|
|
650
|
+
"application/json": {
|
|
651
|
+
error: {
|
|
652
|
+
/** @constant */
|
|
653
|
+
type: "resource_error";
|
|
654
|
+
/** @constant */
|
|
655
|
+
code: "NOT_FOUND";
|
|
656
|
+
message: string;
|
|
657
|
+
details?: string;
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
};
|
|
662
|
+
/** @description A Devbox with the specified name already exists. */
|
|
663
|
+
409: {
|
|
664
|
+
headers: {
|
|
665
|
+
[name: string]: unknown;
|
|
666
|
+
};
|
|
667
|
+
content: {
|
|
668
|
+
"application/json": {
|
|
669
|
+
error: {
|
|
670
|
+
/** @constant */
|
|
671
|
+
type: "resource_error";
|
|
672
|
+
/** @enum {string} */
|
|
673
|
+
code: "ALREADY_EXISTS";
|
|
674
|
+
message: string;
|
|
675
|
+
details?: string;
|
|
676
|
+
};
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
/** @description Failed to create the Devbox. */
|
|
681
|
+
500: {
|
|
682
|
+
headers: {
|
|
683
|
+
[name: string]: unknown;
|
|
684
|
+
};
|
|
685
|
+
content: {
|
|
686
|
+
"application/json": {
|
|
687
|
+
error: {
|
|
688
|
+
/** @enum {string} */
|
|
689
|
+
type: "internal_error";
|
|
690
|
+
/** @enum {string} */
|
|
691
|
+
code: "INTERNAL_ERROR";
|
|
692
|
+
message: string;
|
|
693
|
+
details?: string;
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
getDevbox: {
|
|
701
|
+
parameters: {
|
|
702
|
+
query?: never;
|
|
703
|
+
header?: never;
|
|
704
|
+
path: {
|
|
705
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
706
|
+
name: string;
|
|
707
|
+
};
|
|
708
|
+
cookie?: never;
|
|
709
|
+
};
|
|
710
|
+
requestBody?: never;
|
|
711
|
+
responses: {
|
|
712
|
+
/** @description Devbox details retrieved successfully. */
|
|
713
|
+
200: {
|
|
714
|
+
headers: {
|
|
715
|
+
[name: string]: unknown;
|
|
716
|
+
};
|
|
717
|
+
content: {
|
|
718
|
+
"application/json": {
|
|
719
|
+
/**
|
|
720
|
+
* @description Devbox name
|
|
721
|
+
* @example my-devbox
|
|
722
|
+
*/
|
|
723
|
+
name: string;
|
|
724
|
+
/**
|
|
725
|
+
* @description Creation time in ISO format
|
|
726
|
+
* @example 2023-12-07T10:00:00.000Z
|
|
727
|
+
*/
|
|
728
|
+
createdAt: string;
|
|
729
|
+
/**
|
|
730
|
+
* @description Running duration since first pod started (human-readable)
|
|
731
|
+
* @example 2d3h
|
|
732
|
+
*/
|
|
733
|
+
upTime?: string;
|
|
734
|
+
/**
|
|
735
|
+
* @description Unique identifier
|
|
736
|
+
* @example abc123-def456
|
|
737
|
+
*/
|
|
738
|
+
uid: string;
|
|
739
|
+
/**
|
|
740
|
+
* @description Resource type
|
|
741
|
+
* @default devbox
|
|
742
|
+
* @example devbox
|
|
743
|
+
*/
|
|
744
|
+
resourceType: string;
|
|
745
|
+
/**
|
|
746
|
+
* @description Runtime environment name
|
|
747
|
+
* @example node.js
|
|
748
|
+
*/
|
|
749
|
+
runtime: string;
|
|
750
|
+
/**
|
|
751
|
+
* @description Container image
|
|
752
|
+
* @example ghcr.io/labring/sealos-devbox-nodejs:latest
|
|
753
|
+
*/
|
|
754
|
+
image: string;
|
|
755
|
+
/**
|
|
756
|
+
* @description Devbox status (running, stopped, pending, etc.)
|
|
757
|
+
* @example running
|
|
758
|
+
*/
|
|
759
|
+
status: string;
|
|
760
|
+
/** @description CPU and memory quota allocation */
|
|
761
|
+
quota: {
|
|
762
|
+
/**
|
|
763
|
+
* @description CPU allocation in cores
|
|
764
|
+
* @example 1
|
|
765
|
+
*/
|
|
766
|
+
cpu: number;
|
|
767
|
+
/**
|
|
768
|
+
* @description Memory allocation in GB
|
|
769
|
+
* @example 2
|
|
770
|
+
*/
|
|
771
|
+
memory: number;
|
|
772
|
+
};
|
|
773
|
+
/** @description SSH connection details */
|
|
774
|
+
ssh: {
|
|
775
|
+
/**
|
|
776
|
+
* @description SSH host address
|
|
777
|
+
* @example devbox.cloud.sealos.io
|
|
778
|
+
*/
|
|
779
|
+
host: string;
|
|
780
|
+
/**
|
|
781
|
+
* @description SSH port number, null if not yet assigned
|
|
782
|
+
* @example 40001
|
|
783
|
+
*/
|
|
784
|
+
port: number | null;
|
|
785
|
+
/**
|
|
786
|
+
* @description SSH username
|
|
787
|
+
* @example devbox
|
|
788
|
+
*/
|
|
789
|
+
user: string;
|
|
790
|
+
/**
|
|
791
|
+
* @description Working directory path
|
|
792
|
+
* @example /home/devbox/project
|
|
793
|
+
*/
|
|
794
|
+
workingDir: string;
|
|
795
|
+
/** @description Base64 encoded private key (optional) */
|
|
796
|
+
privateKey?: string;
|
|
797
|
+
};
|
|
798
|
+
/** @description Environment variables (optional) */
|
|
799
|
+
env?: {
|
|
800
|
+
/** @description Environment variable name */
|
|
801
|
+
name: string;
|
|
802
|
+
/** @description Direct value of the environment variable */
|
|
803
|
+
value?: string;
|
|
804
|
+
/** @description Reference to a secret value */
|
|
805
|
+
valueFrom?: {
|
|
806
|
+
secretKeyRef: {
|
|
807
|
+
/** @description Secret name */
|
|
808
|
+
name: string;
|
|
809
|
+
/** @description Secret key */
|
|
810
|
+
key: string;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
}[];
|
|
814
|
+
/** @description Port configurations */
|
|
815
|
+
ports: {
|
|
816
|
+
/**
|
|
817
|
+
* @description Port number
|
|
818
|
+
* @example 8080
|
|
819
|
+
*/
|
|
820
|
+
number: number;
|
|
821
|
+
/** @description Port name identifier */
|
|
822
|
+
portName?: string;
|
|
823
|
+
/**
|
|
824
|
+
* @description Protocol type (http, grpc, ws)
|
|
825
|
+
* @example http
|
|
826
|
+
*/
|
|
827
|
+
protocol?: string;
|
|
828
|
+
/**
|
|
829
|
+
* @description Private access address
|
|
830
|
+
* @example http://my-devbox.ns-user123:8080
|
|
831
|
+
*/
|
|
832
|
+
privateAddress?: string;
|
|
833
|
+
/**
|
|
834
|
+
* @description Public access address
|
|
835
|
+
* @example https://xyz789.cloud.sealos.io
|
|
836
|
+
*/
|
|
837
|
+
publicAddress?: string;
|
|
838
|
+
/** @description Custom domain (if configured) */
|
|
839
|
+
customDomain?: string;
|
|
840
|
+
}[];
|
|
841
|
+
/** @description Pod information */
|
|
842
|
+
pods: {
|
|
843
|
+
/** @description Pod name */
|
|
844
|
+
name: string;
|
|
845
|
+
/**
|
|
846
|
+
* @description Pod status (Running, Pending, Failed, etc.)
|
|
847
|
+
* @example Running
|
|
848
|
+
*/
|
|
849
|
+
status: string;
|
|
850
|
+
}[];
|
|
851
|
+
/** @description Operational status details (optional) */
|
|
852
|
+
operationalStatus?: unknown;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
/** @description Invalid devbox name. */
|
|
857
|
+
400: {
|
|
858
|
+
headers: {
|
|
859
|
+
[name: string]: unknown;
|
|
860
|
+
};
|
|
861
|
+
content: {
|
|
862
|
+
"application/json": {
|
|
863
|
+
error: {
|
|
864
|
+
/** @enum {string} */
|
|
865
|
+
type: "validation_error";
|
|
866
|
+
/** @enum {string} */
|
|
867
|
+
code: "INVALID_PARAMETER";
|
|
868
|
+
message: string;
|
|
869
|
+
details?: {
|
|
870
|
+
field: string;
|
|
871
|
+
message: string;
|
|
872
|
+
}[] | string;
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
878
|
+
401: {
|
|
879
|
+
headers: {
|
|
880
|
+
[name: string]: unknown;
|
|
881
|
+
};
|
|
882
|
+
content: {
|
|
883
|
+
"application/json": {
|
|
884
|
+
error: {
|
|
885
|
+
/** @constant */
|
|
886
|
+
type: "authentication_error";
|
|
887
|
+
/** @constant */
|
|
888
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
889
|
+
message: string;
|
|
890
|
+
details?: string;
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
/** @description The specified Devbox does not exist. */
|
|
896
|
+
404: {
|
|
897
|
+
headers: {
|
|
898
|
+
[name: string]: unknown;
|
|
899
|
+
};
|
|
900
|
+
content: {
|
|
901
|
+
"application/json": {
|
|
902
|
+
error: {
|
|
903
|
+
/** @constant */
|
|
904
|
+
type: "resource_error";
|
|
905
|
+
/** @constant */
|
|
906
|
+
code: "NOT_FOUND";
|
|
907
|
+
message: string;
|
|
908
|
+
details?: string;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
/** @description Failed to retrieve devbox details. */
|
|
914
|
+
500: {
|
|
915
|
+
headers: {
|
|
916
|
+
[name: string]: unknown;
|
|
917
|
+
};
|
|
918
|
+
content: {
|
|
919
|
+
"application/json": {
|
|
920
|
+
error: {
|
|
921
|
+
/** @enum {string} */
|
|
922
|
+
type: "internal_error";
|
|
923
|
+
/** @enum {string} */
|
|
924
|
+
code: "INTERNAL_ERROR";
|
|
925
|
+
message: string;
|
|
926
|
+
details?: string;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
deleteDevbox: {
|
|
934
|
+
parameters: {
|
|
935
|
+
query?: never;
|
|
936
|
+
header?: never;
|
|
937
|
+
path: {
|
|
938
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
939
|
+
name: string;
|
|
940
|
+
};
|
|
941
|
+
cookie?: never;
|
|
942
|
+
};
|
|
943
|
+
requestBody?: never;
|
|
944
|
+
responses: {
|
|
945
|
+
/** @description Devbox deleted successfully, or did not exist (idempotent). */
|
|
946
|
+
204: {
|
|
947
|
+
headers: {
|
|
948
|
+
[name: string]: unknown;
|
|
949
|
+
};
|
|
950
|
+
content?: never;
|
|
951
|
+
};
|
|
952
|
+
/** @description Invalid devbox name. */
|
|
953
|
+
400: {
|
|
954
|
+
headers: {
|
|
955
|
+
[name: string]: unknown;
|
|
956
|
+
};
|
|
957
|
+
content: {
|
|
958
|
+
"application/json": {
|
|
959
|
+
error: {
|
|
960
|
+
/** @enum {string} */
|
|
961
|
+
type: "validation_error";
|
|
962
|
+
/** @enum {string} */
|
|
963
|
+
code: "INVALID_PARAMETER";
|
|
964
|
+
message: string;
|
|
965
|
+
details?: {
|
|
966
|
+
field: string;
|
|
967
|
+
message: string;
|
|
968
|
+
}[] | string;
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
974
|
+
401: {
|
|
975
|
+
headers: {
|
|
976
|
+
[name: string]: unknown;
|
|
977
|
+
};
|
|
978
|
+
content: {
|
|
979
|
+
"application/json": {
|
|
980
|
+
error: {
|
|
981
|
+
/** @constant */
|
|
982
|
+
type: "authentication_error";
|
|
983
|
+
/** @constant */
|
|
984
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
985
|
+
message: string;
|
|
986
|
+
details?: string;
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
};
|
|
991
|
+
/** @description Failed to delete the Devbox or its associated resources. */
|
|
992
|
+
500: {
|
|
993
|
+
headers: {
|
|
994
|
+
[name: string]: unknown;
|
|
995
|
+
};
|
|
996
|
+
content: {
|
|
997
|
+
"application/json": {
|
|
998
|
+
error: {
|
|
999
|
+
/** @enum {string} */
|
|
1000
|
+
type: "internal_error";
|
|
1001
|
+
/** @enum {string} */
|
|
1002
|
+
code: "INTERNAL_ERROR";
|
|
1003
|
+
message: string;
|
|
1004
|
+
details?: string;
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
updateDevbox: {
|
|
1012
|
+
parameters: {
|
|
1013
|
+
query?: never;
|
|
1014
|
+
header?: never;
|
|
1015
|
+
path: {
|
|
1016
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1017
|
+
name: string;
|
|
1018
|
+
};
|
|
1019
|
+
cookie?: never;
|
|
1020
|
+
};
|
|
1021
|
+
/**
|
|
1022
|
+
* @description Fields to update. At least one of `quota` or `ports` is required.
|
|
1023
|
+
*
|
|
1024
|
+
* **Example — update resources only:**
|
|
1025
|
+
* ```json
|
|
1026
|
+
* {
|
|
1027
|
+
* "quota": { "cpu": 2, "memory": 4 }
|
|
1028
|
+
* }
|
|
1029
|
+
* ```
|
|
1030
|
+
*
|
|
1031
|
+
* **Example — replace all ports with a single new public port:**
|
|
1032
|
+
* ```json
|
|
1033
|
+
* {
|
|
1034
|
+
* "ports": [{ "number": 8080, "protocol": "http", "isPublic": true }]
|
|
1035
|
+
* }
|
|
1036
|
+
* ```
|
|
1037
|
+
*
|
|
1038
|
+
* **Example — update an existing port and add a new one:**
|
|
1039
|
+
* ```json
|
|
1040
|
+
* {
|
|
1041
|
+
* "ports": [
|
|
1042
|
+
* { "portName": "port-abc123", "number": 8080, "protocol": "http", "isPublic": true },
|
|
1043
|
+
* { "number": 3000, "protocol": "http", "isPublic": false }
|
|
1044
|
+
* ]
|
|
1045
|
+
* }
|
|
1046
|
+
* ```
|
|
1047
|
+
*/
|
|
1048
|
+
requestBody: {
|
|
1049
|
+
content: {
|
|
1050
|
+
"application/json": {
|
|
1051
|
+
/**
|
|
1052
|
+
* @description Resource allocation for CPU and memory (optional)
|
|
1053
|
+
* @example {
|
|
1054
|
+
* "cpu": 1,
|
|
1055
|
+
* "memory": 2
|
|
1056
|
+
* }
|
|
1057
|
+
*/
|
|
1058
|
+
quota?: {
|
|
1059
|
+
/**
|
|
1060
|
+
* @description CPU allocation in cores (optional)
|
|
1061
|
+
* @example 1
|
|
1062
|
+
*/
|
|
1063
|
+
cpu?: number;
|
|
1064
|
+
/**
|
|
1065
|
+
* @description Memory allocation in GB (optional)
|
|
1066
|
+
* @example 2
|
|
1067
|
+
*/
|
|
1068
|
+
memory?: number;
|
|
1069
|
+
};
|
|
1070
|
+
/** @description Array of port configurations. Include portName to update existing ports, exclude portName to create new ports. Existing ports not included will be deleted. (optional) */
|
|
1071
|
+
ports?: ({
|
|
1072
|
+
/** @description Existing port name to update (include to update specific port) */
|
|
1073
|
+
portName?: string;
|
|
1074
|
+
/** @description Port number (1-65535) - optional for updates */
|
|
1075
|
+
number?: number;
|
|
1076
|
+
/**
|
|
1077
|
+
* @description Protocol type - optional for updates
|
|
1078
|
+
* @enum {string}
|
|
1079
|
+
*/
|
|
1080
|
+
protocol?: "http" | "grpc" | "ws";
|
|
1081
|
+
/** @description Enable public domain access - optional for updates */
|
|
1082
|
+
isPublic?: boolean;
|
|
1083
|
+
/** @description Custom domain - optional for updates */
|
|
1084
|
+
customDomain?: string;
|
|
1085
|
+
} | {
|
|
1086
|
+
/** @description Port number (1-65535) - required for new ports */
|
|
1087
|
+
number: number;
|
|
1088
|
+
/**
|
|
1089
|
+
* @description Protocol type, defaults to HTTP
|
|
1090
|
+
* @default http
|
|
1091
|
+
* @enum {string}
|
|
1092
|
+
*/
|
|
1093
|
+
protocol?: "http" | "grpc" | "ws";
|
|
1094
|
+
/**
|
|
1095
|
+
* @description Enable public domain access, defaults to true
|
|
1096
|
+
* @default true
|
|
1097
|
+
*/
|
|
1098
|
+
isPublic?: boolean;
|
|
1099
|
+
/** @description Custom domain (optional) */
|
|
1100
|
+
customDomain?: string;
|
|
1101
|
+
})[];
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
responses: {
|
|
1106
|
+
/** @description Devbox updated successfully. */
|
|
1107
|
+
204: {
|
|
1108
|
+
headers: {
|
|
1109
|
+
[name: string]: unknown;
|
|
1110
|
+
};
|
|
1111
|
+
content?: never;
|
|
1112
|
+
};
|
|
1113
|
+
/** @description Request body failed validation. */
|
|
1114
|
+
400: {
|
|
1115
|
+
headers: {
|
|
1116
|
+
[name: string]: unknown;
|
|
1117
|
+
};
|
|
1118
|
+
content: {
|
|
1119
|
+
"application/json": {
|
|
1120
|
+
error: {
|
|
1121
|
+
/** @enum {string} */
|
|
1122
|
+
type: "validation_error";
|
|
1123
|
+
/** @enum {string} */
|
|
1124
|
+
code: "INVALID_PARAMETER";
|
|
1125
|
+
message: string;
|
|
1126
|
+
details?: {
|
|
1127
|
+
field: string;
|
|
1128
|
+
message: string;
|
|
1129
|
+
}[] | string;
|
|
1130
|
+
};
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1135
|
+
401: {
|
|
1136
|
+
headers: {
|
|
1137
|
+
[name: string]: unknown;
|
|
1138
|
+
};
|
|
1139
|
+
content: {
|
|
1140
|
+
"application/json": {
|
|
1141
|
+
error: {
|
|
1142
|
+
/** @constant */
|
|
1143
|
+
type: "authentication_error";
|
|
1144
|
+
/** @constant */
|
|
1145
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1146
|
+
message: string;
|
|
1147
|
+
details?: string;
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
/** @description Devbox not found, or a referenced `portName` does not exist. */
|
|
1153
|
+
404: {
|
|
1154
|
+
headers: {
|
|
1155
|
+
[name: string]: unknown;
|
|
1156
|
+
};
|
|
1157
|
+
content: {
|
|
1158
|
+
"application/json": {
|
|
1159
|
+
error: {
|
|
1160
|
+
/** @constant */
|
|
1161
|
+
type: "resource_error";
|
|
1162
|
+
/** @constant */
|
|
1163
|
+
code: "NOT_FOUND";
|
|
1164
|
+
message: string;
|
|
1165
|
+
details?: string;
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
/** @description Port number is already in use by another port. */
|
|
1171
|
+
409: {
|
|
1172
|
+
headers: {
|
|
1173
|
+
[name: string]: unknown;
|
|
1174
|
+
};
|
|
1175
|
+
content: {
|
|
1176
|
+
"application/json": {
|
|
1177
|
+
error: {
|
|
1178
|
+
/** @constant */
|
|
1179
|
+
type: "resource_error";
|
|
1180
|
+
/** @enum {string} */
|
|
1181
|
+
code: "ALREADY_EXISTS" | "CONFLICT";
|
|
1182
|
+
message: string;
|
|
1183
|
+
details?: string;
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
/** @description Resource specification rejected by the Kubernetes cluster. */
|
|
1189
|
+
422: {
|
|
1190
|
+
headers: {
|
|
1191
|
+
[name: string]: unknown;
|
|
1192
|
+
};
|
|
1193
|
+
content: {
|
|
1194
|
+
"application/json": {
|
|
1195
|
+
error: {
|
|
1196
|
+
/** @constant */
|
|
1197
|
+
type: "operation_error";
|
|
1198
|
+
/** @constant */
|
|
1199
|
+
code: "INVALID_RESOURCE_SPEC";
|
|
1200
|
+
message: string;
|
|
1201
|
+
details?: string;
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
/** @description Failed to update the Devbox. */
|
|
1207
|
+
500: {
|
|
1208
|
+
headers: {
|
|
1209
|
+
[name: string]: unknown;
|
|
1210
|
+
};
|
|
1211
|
+
content: {
|
|
1212
|
+
"application/json": {
|
|
1213
|
+
error: {
|
|
1214
|
+
/** @enum {string} */
|
|
1215
|
+
type: "internal_error";
|
|
1216
|
+
/** @enum {string} */
|
|
1217
|
+
code: "INTERNAL_ERROR";
|
|
1218
|
+
message: string;
|
|
1219
|
+
details?: string;
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
autostartDevbox: {
|
|
1227
|
+
parameters: {
|
|
1228
|
+
query?: never;
|
|
1229
|
+
header?: never;
|
|
1230
|
+
path: {
|
|
1231
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1232
|
+
name: string;
|
|
1233
|
+
};
|
|
1234
|
+
cookie?: never;
|
|
1235
|
+
};
|
|
1236
|
+
/**
|
|
1237
|
+
* @description Autostart configuration. The body is optional — send `{}` to use the default entrypoint.
|
|
1238
|
+
*
|
|
1239
|
+
* **Example — custom startup script:**
|
|
1240
|
+
* ```json
|
|
1241
|
+
* {
|
|
1242
|
+
* "execCommand": "/bin/bash /home/devbox/project/startup.sh"
|
|
1243
|
+
* }
|
|
1244
|
+
* ```
|
|
1245
|
+
*/
|
|
1246
|
+
requestBody?: {
|
|
1247
|
+
content: {
|
|
1248
|
+
"application/json": {
|
|
1249
|
+
/**
|
|
1250
|
+
* @description Custom command to execute in the devbox (optional)
|
|
1251
|
+
* @example /bin/bash /home/devbox/project/entrypoint.sh
|
|
1252
|
+
*/
|
|
1253
|
+
execCommand?: string;
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
responses: {
|
|
1258
|
+
/** @description Autostart configured successfully. */
|
|
1259
|
+
204: {
|
|
1260
|
+
headers: {
|
|
1261
|
+
[name: string]: unknown;
|
|
1262
|
+
};
|
|
1263
|
+
content?: never;
|
|
1264
|
+
};
|
|
1265
|
+
/** @description Invalid request parameters. */
|
|
1266
|
+
400: {
|
|
1267
|
+
headers: {
|
|
1268
|
+
[name: string]: unknown;
|
|
1269
|
+
};
|
|
1270
|
+
content: {
|
|
1271
|
+
"application/json": {
|
|
1272
|
+
error: {
|
|
1273
|
+
/** @enum {string} */
|
|
1274
|
+
type: "validation_error";
|
|
1275
|
+
/** @enum {string} */
|
|
1276
|
+
code: "INVALID_PARAMETER";
|
|
1277
|
+
message: string;
|
|
1278
|
+
details?: {
|
|
1279
|
+
field: string;
|
|
1280
|
+
message: string;
|
|
1281
|
+
}[] | string;
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1287
|
+
401: {
|
|
1288
|
+
headers: {
|
|
1289
|
+
[name: string]: unknown;
|
|
1290
|
+
};
|
|
1291
|
+
content: {
|
|
1292
|
+
"application/json": {
|
|
1293
|
+
error: {
|
|
1294
|
+
/** @constant */
|
|
1295
|
+
type: "authentication_error";
|
|
1296
|
+
/** @constant */
|
|
1297
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1298
|
+
message: string;
|
|
1299
|
+
details?: string;
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
};
|
|
1304
|
+
/** @description The specified Devbox does not exist. */
|
|
1305
|
+
404: {
|
|
1306
|
+
headers: {
|
|
1307
|
+
[name: string]: unknown;
|
|
1308
|
+
};
|
|
1309
|
+
content: {
|
|
1310
|
+
"application/json": {
|
|
1311
|
+
error: {
|
|
1312
|
+
/** @constant */
|
|
1313
|
+
type: "resource_error";
|
|
1314
|
+
/** @constant */
|
|
1315
|
+
code: "NOT_FOUND";
|
|
1316
|
+
message: string;
|
|
1317
|
+
details?: string;
|
|
1318
|
+
};
|
|
1319
|
+
};
|
|
1320
|
+
};
|
|
1321
|
+
};
|
|
1322
|
+
/** @description Failed to configure autostart. */
|
|
1323
|
+
500: {
|
|
1324
|
+
headers: {
|
|
1325
|
+
[name: string]: unknown;
|
|
1326
|
+
};
|
|
1327
|
+
content: {
|
|
1328
|
+
"application/json": {
|
|
1329
|
+
error: {
|
|
1330
|
+
/** @enum {string} */
|
|
1331
|
+
type: "internal_error";
|
|
1332
|
+
/** @enum {string} */
|
|
1333
|
+
code: "INTERNAL_ERROR";
|
|
1334
|
+
message: string;
|
|
1335
|
+
details?: string;
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
};
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1342
|
+
startDevbox: {
|
|
1343
|
+
parameters: {
|
|
1344
|
+
query?: never;
|
|
1345
|
+
header?: never;
|
|
1346
|
+
path: {
|
|
1347
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1348
|
+
name: string;
|
|
1349
|
+
};
|
|
1350
|
+
cookie?: never;
|
|
1351
|
+
};
|
|
1352
|
+
requestBody?: never;
|
|
1353
|
+
responses: {
|
|
1354
|
+
/** @description Devbox started successfully. */
|
|
1355
|
+
204: {
|
|
1356
|
+
headers: {
|
|
1357
|
+
[name: string]: unknown;
|
|
1358
|
+
};
|
|
1359
|
+
content?: never;
|
|
1360
|
+
};
|
|
1361
|
+
/** @description Invalid devbox name. */
|
|
1362
|
+
400: {
|
|
1363
|
+
headers: {
|
|
1364
|
+
[name: string]: unknown;
|
|
1365
|
+
};
|
|
1366
|
+
content: {
|
|
1367
|
+
"application/json": {
|
|
1368
|
+
error: {
|
|
1369
|
+
/** @enum {string} */
|
|
1370
|
+
type: "validation_error";
|
|
1371
|
+
/** @enum {string} */
|
|
1372
|
+
code: "INVALID_PARAMETER";
|
|
1373
|
+
message: string;
|
|
1374
|
+
details?: {
|
|
1375
|
+
field: string;
|
|
1376
|
+
message: string;
|
|
1377
|
+
}[] | string;
|
|
1378
|
+
};
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1383
|
+
401: {
|
|
1384
|
+
headers: {
|
|
1385
|
+
[name: string]: unknown;
|
|
1386
|
+
};
|
|
1387
|
+
content: {
|
|
1388
|
+
"application/json": {
|
|
1389
|
+
error: {
|
|
1390
|
+
/** @constant */
|
|
1391
|
+
type: "authentication_error";
|
|
1392
|
+
/** @constant */
|
|
1393
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1394
|
+
message: string;
|
|
1395
|
+
details?: string;
|
|
1396
|
+
};
|
|
1397
|
+
};
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
/** @description The specified Devbox does not exist. */
|
|
1401
|
+
404: {
|
|
1402
|
+
headers: {
|
|
1403
|
+
[name: string]: unknown;
|
|
1404
|
+
};
|
|
1405
|
+
content: {
|
|
1406
|
+
"application/json": {
|
|
1407
|
+
error: {
|
|
1408
|
+
/** @constant */
|
|
1409
|
+
type: "resource_error";
|
|
1410
|
+
/** @constant */
|
|
1411
|
+
code: "NOT_FOUND";
|
|
1412
|
+
message: string;
|
|
1413
|
+
details?: string;
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
};
|
|
1418
|
+
/** @description Failed to start the Devbox. */
|
|
1419
|
+
500: {
|
|
1420
|
+
headers: {
|
|
1421
|
+
[name: string]: unknown;
|
|
1422
|
+
};
|
|
1423
|
+
content: {
|
|
1424
|
+
"application/json": {
|
|
1425
|
+
error: {
|
|
1426
|
+
/** @enum {string} */
|
|
1427
|
+
type: "internal_error";
|
|
1428
|
+
/** @enum {string} */
|
|
1429
|
+
code: "INTERNAL_ERROR";
|
|
1430
|
+
message: string;
|
|
1431
|
+
details?: string;
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
};
|
|
1437
|
+
};
|
|
1438
|
+
pauseDevbox: {
|
|
1439
|
+
parameters: {
|
|
1440
|
+
query?: never;
|
|
1441
|
+
header?: never;
|
|
1442
|
+
path: {
|
|
1443
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1444
|
+
name: string;
|
|
1445
|
+
};
|
|
1446
|
+
cookie?: never;
|
|
1447
|
+
};
|
|
1448
|
+
requestBody?: {
|
|
1449
|
+
content: {
|
|
1450
|
+
"application/json": Record<string, never>;
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
responses: {
|
|
1454
|
+
/** @description Devbox paused successfully. */
|
|
1455
|
+
204: {
|
|
1456
|
+
headers: {
|
|
1457
|
+
[name: string]: unknown;
|
|
1458
|
+
};
|
|
1459
|
+
content?: never;
|
|
1460
|
+
};
|
|
1461
|
+
/** @description Request body failed validation. */
|
|
1462
|
+
400: {
|
|
1463
|
+
headers: {
|
|
1464
|
+
[name: string]: unknown;
|
|
1465
|
+
};
|
|
1466
|
+
content: {
|
|
1467
|
+
"application/json": {
|
|
1468
|
+
error: {
|
|
1469
|
+
/** @enum {string} */
|
|
1470
|
+
type: "validation_error";
|
|
1471
|
+
/** @enum {string} */
|
|
1472
|
+
code: "INVALID_PARAMETER";
|
|
1473
|
+
message: string;
|
|
1474
|
+
details?: {
|
|
1475
|
+
field: string;
|
|
1476
|
+
message: string;
|
|
1477
|
+
}[] | string;
|
|
1478
|
+
};
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1481
|
+
};
|
|
1482
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1483
|
+
401: {
|
|
1484
|
+
headers: {
|
|
1485
|
+
[name: string]: unknown;
|
|
1486
|
+
};
|
|
1487
|
+
content: {
|
|
1488
|
+
"application/json": {
|
|
1489
|
+
error: {
|
|
1490
|
+
/** @constant */
|
|
1491
|
+
type: "authentication_error";
|
|
1492
|
+
/** @constant */
|
|
1493
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1494
|
+
message: string;
|
|
1495
|
+
details?: string;
|
|
1496
|
+
};
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
/** @description The specified Devbox does not exist. */
|
|
1501
|
+
404: {
|
|
1502
|
+
headers: {
|
|
1503
|
+
[name: string]: unknown;
|
|
1504
|
+
};
|
|
1505
|
+
content: {
|
|
1506
|
+
"application/json": {
|
|
1507
|
+
error: {
|
|
1508
|
+
/** @constant */
|
|
1509
|
+
type: "resource_error";
|
|
1510
|
+
/** @constant */
|
|
1511
|
+
code: "NOT_FOUND";
|
|
1512
|
+
message: string;
|
|
1513
|
+
details?: string;
|
|
1514
|
+
};
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
/** @description Failed to pause the Devbox. */
|
|
1519
|
+
500: {
|
|
1520
|
+
headers: {
|
|
1521
|
+
[name: string]: unknown;
|
|
1522
|
+
};
|
|
1523
|
+
content: {
|
|
1524
|
+
"application/json": {
|
|
1525
|
+
error: {
|
|
1526
|
+
/** @enum {string} */
|
|
1527
|
+
type: "internal_error";
|
|
1528
|
+
/** @enum {string} */
|
|
1529
|
+
code: "INTERNAL_ERROR";
|
|
1530
|
+
message: string;
|
|
1531
|
+
details?: string;
|
|
1532
|
+
};
|
|
1533
|
+
};
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
};
|
|
1537
|
+
};
|
|
1538
|
+
shutdownDevbox: {
|
|
1539
|
+
parameters: {
|
|
1540
|
+
query?: never;
|
|
1541
|
+
header?: never;
|
|
1542
|
+
path: {
|
|
1543
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1544
|
+
name: string;
|
|
1545
|
+
};
|
|
1546
|
+
cookie?: never;
|
|
1547
|
+
};
|
|
1548
|
+
requestBody?: {
|
|
1549
|
+
content: {
|
|
1550
|
+
"application/json": Record<string, never>;
|
|
1551
|
+
};
|
|
1552
|
+
};
|
|
1553
|
+
responses: {
|
|
1554
|
+
/** @description Devbox shut down successfully. */
|
|
1555
|
+
204: {
|
|
1556
|
+
headers: {
|
|
1557
|
+
[name: string]: unknown;
|
|
1558
|
+
};
|
|
1559
|
+
content?: never;
|
|
1560
|
+
};
|
|
1561
|
+
/** @description Request body failed validation. */
|
|
1562
|
+
400: {
|
|
1563
|
+
headers: {
|
|
1564
|
+
[name: string]: unknown;
|
|
1565
|
+
};
|
|
1566
|
+
content: {
|
|
1567
|
+
"application/json": {
|
|
1568
|
+
error: {
|
|
1569
|
+
/** @enum {string} */
|
|
1570
|
+
type: "validation_error";
|
|
1571
|
+
/** @enum {string} */
|
|
1572
|
+
code: "INVALID_PARAMETER";
|
|
1573
|
+
message: string;
|
|
1574
|
+
details?: {
|
|
1575
|
+
field: string;
|
|
1576
|
+
message: string;
|
|
1577
|
+
}[] | string;
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1583
|
+
401: {
|
|
1584
|
+
headers: {
|
|
1585
|
+
[name: string]: unknown;
|
|
1586
|
+
};
|
|
1587
|
+
content: {
|
|
1588
|
+
"application/json": {
|
|
1589
|
+
error: {
|
|
1590
|
+
/** @constant */
|
|
1591
|
+
type: "authentication_error";
|
|
1592
|
+
/** @constant */
|
|
1593
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1594
|
+
message: string;
|
|
1595
|
+
details?: string;
|
|
1596
|
+
};
|
|
1597
|
+
};
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
/** @description The specified Devbox does not exist. */
|
|
1601
|
+
404: {
|
|
1602
|
+
headers: {
|
|
1603
|
+
[name: string]: unknown;
|
|
1604
|
+
};
|
|
1605
|
+
content: {
|
|
1606
|
+
"application/json": {
|
|
1607
|
+
error: {
|
|
1608
|
+
/** @constant */
|
|
1609
|
+
type: "resource_error";
|
|
1610
|
+
/** @constant */
|
|
1611
|
+
code: "NOT_FOUND";
|
|
1612
|
+
message: string;
|
|
1613
|
+
details?: string;
|
|
1614
|
+
};
|
|
1615
|
+
};
|
|
1616
|
+
};
|
|
1617
|
+
};
|
|
1618
|
+
/** @description Failed to shut down the Devbox. */
|
|
1619
|
+
500: {
|
|
1620
|
+
headers: {
|
|
1621
|
+
[name: string]: unknown;
|
|
1622
|
+
};
|
|
1623
|
+
content: {
|
|
1624
|
+
"application/json": {
|
|
1625
|
+
error: {
|
|
1626
|
+
/** @enum {string} */
|
|
1627
|
+
type: "internal_error";
|
|
1628
|
+
/** @enum {string} */
|
|
1629
|
+
code: "INTERNAL_ERROR";
|
|
1630
|
+
message: string;
|
|
1631
|
+
details?: string;
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1638
|
+
restartDevbox: {
|
|
1639
|
+
parameters: {
|
|
1640
|
+
query?: never;
|
|
1641
|
+
header?: never;
|
|
1642
|
+
path: {
|
|
1643
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1644
|
+
name: string;
|
|
1645
|
+
};
|
|
1646
|
+
cookie?: never;
|
|
1647
|
+
};
|
|
1648
|
+
requestBody?: {
|
|
1649
|
+
content: {
|
|
1650
|
+
"application/json": Record<string, never>;
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
responses: {
|
|
1654
|
+
/** @description Devbox restarted successfully. */
|
|
1655
|
+
204: {
|
|
1656
|
+
headers: {
|
|
1657
|
+
[name: string]: unknown;
|
|
1658
|
+
};
|
|
1659
|
+
content?: never;
|
|
1660
|
+
};
|
|
1661
|
+
/** @description Request body failed validation. */
|
|
1662
|
+
400: {
|
|
1663
|
+
headers: {
|
|
1664
|
+
[name: string]: unknown;
|
|
1665
|
+
};
|
|
1666
|
+
content: {
|
|
1667
|
+
"application/json": {
|
|
1668
|
+
error: {
|
|
1669
|
+
/** @enum {string} */
|
|
1670
|
+
type: "validation_error";
|
|
1671
|
+
/** @enum {string} */
|
|
1672
|
+
code: "INVALID_PARAMETER";
|
|
1673
|
+
message: string;
|
|
1674
|
+
details?: {
|
|
1675
|
+
field: string;
|
|
1676
|
+
message: string;
|
|
1677
|
+
}[] | string;
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1683
|
+
401: {
|
|
1684
|
+
headers: {
|
|
1685
|
+
[name: string]: unknown;
|
|
1686
|
+
};
|
|
1687
|
+
content: {
|
|
1688
|
+
"application/json": {
|
|
1689
|
+
error: {
|
|
1690
|
+
/** @constant */
|
|
1691
|
+
type: "authentication_error";
|
|
1692
|
+
/** @constant */
|
|
1693
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1694
|
+
message: string;
|
|
1695
|
+
details?: string;
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
};
|
|
1699
|
+
};
|
|
1700
|
+
/** @description The specified Devbox does not exist. */
|
|
1701
|
+
404: {
|
|
1702
|
+
headers: {
|
|
1703
|
+
[name: string]: unknown;
|
|
1704
|
+
};
|
|
1705
|
+
content: {
|
|
1706
|
+
"application/json": {
|
|
1707
|
+
error: {
|
|
1708
|
+
/** @constant */
|
|
1709
|
+
type: "resource_error";
|
|
1710
|
+
/** @constant */
|
|
1711
|
+
code: "NOT_FOUND";
|
|
1712
|
+
message: string;
|
|
1713
|
+
details?: string;
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
/** @description Restart cycle failed. */
|
|
1719
|
+
500: {
|
|
1720
|
+
headers: {
|
|
1721
|
+
[name: string]: unknown;
|
|
1722
|
+
};
|
|
1723
|
+
content: {
|
|
1724
|
+
"application/json": {
|
|
1725
|
+
error: {
|
|
1726
|
+
/** @enum {string} */
|
|
1727
|
+
type: "internal_error";
|
|
1728
|
+
/** @enum {string} */
|
|
1729
|
+
code: "INTERNAL_ERROR";
|
|
1730
|
+
message: string;
|
|
1731
|
+
details?: string;
|
|
1732
|
+
};
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1738
|
+
listDevboxReleases: {
|
|
1739
|
+
parameters: {
|
|
1740
|
+
query?: never;
|
|
1741
|
+
header?: never;
|
|
1742
|
+
path: {
|
|
1743
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1744
|
+
name: string;
|
|
1745
|
+
};
|
|
1746
|
+
cookie?: never;
|
|
1747
|
+
};
|
|
1748
|
+
requestBody?: never;
|
|
1749
|
+
responses: {
|
|
1750
|
+
/** @description Release list retrieved successfully. */
|
|
1751
|
+
200: {
|
|
1752
|
+
headers: {
|
|
1753
|
+
[name: string]: unknown;
|
|
1754
|
+
};
|
|
1755
|
+
content: {
|
|
1756
|
+
"application/json": {
|
|
1757
|
+
/** @description Version ID */
|
|
1758
|
+
id: string;
|
|
1759
|
+
/** @description Version name */
|
|
1760
|
+
name: string;
|
|
1761
|
+
/** @description Devbox name */
|
|
1762
|
+
devboxName: string;
|
|
1763
|
+
/** @description Creation time in YYYY-MM-DD HH:mm format */
|
|
1764
|
+
createdAt: string;
|
|
1765
|
+
/** @description Version tag */
|
|
1766
|
+
tag: string;
|
|
1767
|
+
/** @description Version description */
|
|
1768
|
+
description: string;
|
|
1769
|
+
/** @description Release image address */
|
|
1770
|
+
image: string;
|
|
1771
|
+
}[];
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
/** @description Invalid devbox name. */
|
|
1775
|
+
400: {
|
|
1776
|
+
headers: {
|
|
1777
|
+
[name: string]: unknown;
|
|
1778
|
+
};
|
|
1779
|
+
content: {
|
|
1780
|
+
"application/json": {
|
|
1781
|
+
error: {
|
|
1782
|
+
/** @enum {string} */
|
|
1783
|
+
type: "validation_error";
|
|
1784
|
+
/** @enum {string} */
|
|
1785
|
+
code: "INVALID_PARAMETER";
|
|
1786
|
+
message: string;
|
|
1787
|
+
details?: {
|
|
1788
|
+
field: string;
|
|
1789
|
+
message: string;
|
|
1790
|
+
}[] | string;
|
|
1791
|
+
};
|
|
1792
|
+
};
|
|
1793
|
+
};
|
|
1794
|
+
};
|
|
1795
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1796
|
+
401: {
|
|
1797
|
+
headers: {
|
|
1798
|
+
[name: string]: unknown;
|
|
1799
|
+
};
|
|
1800
|
+
content: {
|
|
1801
|
+
"application/json": {
|
|
1802
|
+
error: {
|
|
1803
|
+
/** @constant */
|
|
1804
|
+
type: "authentication_error";
|
|
1805
|
+
/** @constant */
|
|
1806
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1807
|
+
message: string;
|
|
1808
|
+
details?: string;
|
|
1809
|
+
};
|
|
1810
|
+
};
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
/** @description The specified Devbox does not exist. */
|
|
1814
|
+
404: {
|
|
1815
|
+
headers: {
|
|
1816
|
+
[name: string]: unknown;
|
|
1817
|
+
};
|
|
1818
|
+
content: {
|
|
1819
|
+
"application/json": {
|
|
1820
|
+
error: {
|
|
1821
|
+
/** @constant */
|
|
1822
|
+
type: "resource_error";
|
|
1823
|
+
/** @constant */
|
|
1824
|
+
code: "NOT_FOUND";
|
|
1825
|
+
message: string;
|
|
1826
|
+
details?: string;
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
/** @description Failed to retrieve the release list. */
|
|
1832
|
+
500: {
|
|
1833
|
+
headers: {
|
|
1834
|
+
[name: string]: unknown;
|
|
1835
|
+
};
|
|
1836
|
+
content: {
|
|
1837
|
+
"application/json": {
|
|
1838
|
+
error: {
|
|
1839
|
+
/** @enum {string} */
|
|
1840
|
+
type: "internal_error";
|
|
1841
|
+
/** @enum {string} */
|
|
1842
|
+
code: "INTERNAL_ERROR";
|
|
1843
|
+
message: string;
|
|
1844
|
+
details?: string;
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
};
|
|
1851
|
+
createDevboxRelease: {
|
|
1852
|
+
parameters: {
|
|
1853
|
+
query?: never;
|
|
1854
|
+
header?: never;
|
|
1855
|
+
path: {
|
|
1856
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
1857
|
+
name: string;
|
|
1858
|
+
};
|
|
1859
|
+
cookie?: never;
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* @description Release parameters.
|
|
1863
|
+
*
|
|
1864
|
+
* **Example — minimal (restart after build, no custom startup command):**
|
|
1865
|
+
* ```json
|
|
1866
|
+
* {
|
|
1867
|
+
* "tag": "v1-2-0",
|
|
1868
|
+
* "releaseDescription": "Added API improvements and bug fixes."
|
|
1869
|
+
* }
|
|
1870
|
+
* ```
|
|
1871
|
+
*
|
|
1872
|
+
* **Example — keep Devbox stopped after release:**
|
|
1873
|
+
* ```json
|
|
1874
|
+
* {
|
|
1875
|
+
* "tag": "v1-0-0",
|
|
1876
|
+
* "releaseDescription": "Hotfix",
|
|
1877
|
+
* "startDevboxAfterRelease": false
|
|
1878
|
+
* }
|
|
1879
|
+
* ```
|
|
1880
|
+
*
|
|
1881
|
+
* **Example — restart with autostart command:**
|
|
1882
|
+
* ```json
|
|
1883
|
+
* {
|
|
1884
|
+
* "tag": "v1-3-0",
|
|
1885
|
+
* "releaseDescription": "Adds startup script",
|
|
1886
|
+
* "execCommand": "nohup /home/devbox/project/entrypoint.sh > /dev/null 2>&1 &"
|
|
1887
|
+
* }
|
|
1888
|
+
* ```
|
|
1889
|
+
*/
|
|
1890
|
+
requestBody: {
|
|
1891
|
+
content: {
|
|
1892
|
+
"application/json": {
|
|
1893
|
+
/** @description Release tag */
|
|
1894
|
+
tag: string;
|
|
1895
|
+
/**
|
|
1896
|
+
* @description Release description
|
|
1897
|
+
* @default
|
|
1898
|
+
*/
|
|
1899
|
+
releaseDescription?: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* @description Command to execute in the devbox after release restart (autostart)
|
|
1902
|
+
* @example nohup /home/devbox/project/entrypoint.sh > /dev/null 2>&1 &
|
|
1903
|
+
*/
|
|
1904
|
+
execCommand?: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* @description Restart devbox automatically after the release build completes. Defaults to `true`.
|
|
1907
|
+
* @default true
|
|
1908
|
+
*/
|
|
1909
|
+
startDevboxAfterRelease?: boolean;
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
};
|
|
1913
|
+
responses: {
|
|
1914
|
+
/** @description Release accepted. The container image build pipeline has started in the background. Poll `GET /devbox/{name}/releases` to track progress. */
|
|
1915
|
+
202: {
|
|
1916
|
+
headers: {
|
|
1917
|
+
[name: string]: unknown;
|
|
1918
|
+
};
|
|
1919
|
+
content: {
|
|
1920
|
+
"application/json": {
|
|
1921
|
+
/**
|
|
1922
|
+
* @description Devbox name
|
|
1923
|
+
* @example my-python-api
|
|
1924
|
+
*/
|
|
1925
|
+
name: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* @description Always `creating` — the build is running asynchronously.
|
|
1928
|
+
* @example creating
|
|
1929
|
+
* @enum {string}
|
|
1930
|
+
*/
|
|
1931
|
+
status: "creating";
|
|
1932
|
+
};
|
|
1933
|
+
};
|
|
1934
|
+
};
|
|
1935
|
+
/** @description Request body failed validation. */
|
|
1936
|
+
400: {
|
|
1937
|
+
headers: {
|
|
1938
|
+
[name: string]: unknown;
|
|
1939
|
+
};
|
|
1940
|
+
content: {
|
|
1941
|
+
"application/json": {
|
|
1942
|
+
error: {
|
|
1943
|
+
/** @enum {string} */
|
|
1944
|
+
type: "validation_error";
|
|
1945
|
+
/** @enum {string} */
|
|
1946
|
+
code: "INVALID_PARAMETER";
|
|
1947
|
+
message: string;
|
|
1948
|
+
details?: {
|
|
1949
|
+
field: string;
|
|
1950
|
+
message: string;
|
|
1951
|
+
}[] | string;
|
|
1952
|
+
};
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
};
|
|
1956
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
1957
|
+
401: {
|
|
1958
|
+
headers: {
|
|
1959
|
+
[name: string]: unknown;
|
|
1960
|
+
};
|
|
1961
|
+
content: {
|
|
1962
|
+
"application/json": {
|
|
1963
|
+
error: {
|
|
1964
|
+
/** @constant */
|
|
1965
|
+
type: "authentication_error";
|
|
1966
|
+
/** @constant */
|
|
1967
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
1968
|
+
message: string;
|
|
1969
|
+
details?: string;
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
};
|
|
1973
|
+
};
|
|
1974
|
+
/** @description The specified Devbox does not exist. */
|
|
1975
|
+
404: {
|
|
1976
|
+
headers: {
|
|
1977
|
+
[name: string]: unknown;
|
|
1978
|
+
};
|
|
1979
|
+
content: {
|
|
1980
|
+
"application/json": {
|
|
1981
|
+
error: {
|
|
1982
|
+
/** @constant */
|
|
1983
|
+
type: "resource_error";
|
|
1984
|
+
/** @constant */
|
|
1985
|
+
code: "NOT_FOUND";
|
|
1986
|
+
message: string;
|
|
1987
|
+
details?: string;
|
|
1988
|
+
};
|
|
1989
|
+
};
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
/** @description A release with this tag already exists for this Devbox. */
|
|
1993
|
+
409: {
|
|
1994
|
+
headers: {
|
|
1995
|
+
[name: string]: unknown;
|
|
1996
|
+
};
|
|
1997
|
+
content: {
|
|
1998
|
+
"application/json": {
|
|
1999
|
+
error: {
|
|
2000
|
+
/** @constant */
|
|
2001
|
+
type: "resource_error";
|
|
2002
|
+
/** @enum {string} */
|
|
2003
|
+
code: "ALREADY_EXISTS";
|
|
2004
|
+
message: string;
|
|
2005
|
+
details?: string;
|
|
2006
|
+
};
|
|
2007
|
+
};
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
/** @description Failed to create the release. */
|
|
2011
|
+
500: {
|
|
2012
|
+
headers: {
|
|
2013
|
+
[name: string]: unknown;
|
|
2014
|
+
};
|
|
2015
|
+
content: {
|
|
2016
|
+
"application/json": {
|
|
2017
|
+
error: {
|
|
2018
|
+
/** @enum {string} */
|
|
2019
|
+
type: "internal_error";
|
|
2020
|
+
/** @enum {string} */
|
|
2021
|
+
code: "INTERNAL_ERROR";
|
|
2022
|
+
message: string;
|
|
2023
|
+
details?: string;
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
2029
|
+
};
|
|
2030
|
+
listDevboxDeployments: {
|
|
2031
|
+
parameters: {
|
|
2032
|
+
query?: never;
|
|
2033
|
+
header?: never;
|
|
2034
|
+
path: {
|
|
2035
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2036
|
+
name: string;
|
|
2037
|
+
};
|
|
2038
|
+
cookie?: never;
|
|
2039
|
+
};
|
|
2040
|
+
requestBody?: never;
|
|
2041
|
+
responses: {
|
|
2042
|
+
/** @description Deployment list retrieved successfully. */
|
|
2043
|
+
200: {
|
|
2044
|
+
headers: {
|
|
2045
|
+
[name: string]: unknown;
|
|
2046
|
+
};
|
|
2047
|
+
content: {
|
|
2048
|
+
"application/json": {
|
|
2049
|
+
/** @description Deployment or StatefulSet name */
|
|
2050
|
+
name: string;
|
|
2051
|
+
/**
|
|
2052
|
+
* @description Resource type
|
|
2053
|
+
* @enum {string}
|
|
2054
|
+
*/
|
|
2055
|
+
resourceType: "deployment" | "statefulset";
|
|
2056
|
+
/** @description Devbox tag extracted from image name */
|
|
2057
|
+
tag: string;
|
|
2058
|
+
}[];
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
/** @description Invalid devbox name. */
|
|
2062
|
+
400: {
|
|
2063
|
+
headers: {
|
|
2064
|
+
[name: string]: unknown;
|
|
2065
|
+
};
|
|
2066
|
+
content: {
|
|
2067
|
+
"application/json": {
|
|
2068
|
+
error: {
|
|
2069
|
+
/** @enum {string} */
|
|
2070
|
+
type: "validation_error";
|
|
2071
|
+
/** @enum {string} */
|
|
2072
|
+
code: "INVALID_PARAMETER";
|
|
2073
|
+
message: string;
|
|
2074
|
+
details?: {
|
|
2075
|
+
field: string;
|
|
2076
|
+
message: string;
|
|
2077
|
+
}[] | string;
|
|
2078
|
+
};
|
|
2079
|
+
};
|
|
2080
|
+
};
|
|
2081
|
+
};
|
|
2082
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
2083
|
+
401: {
|
|
2084
|
+
headers: {
|
|
2085
|
+
[name: string]: unknown;
|
|
2086
|
+
};
|
|
2087
|
+
content: {
|
|
2088
|
+
"application/json": {
|
|
2089
|
+
error: {
|
|
2090
|
+
/** @constant */
|
|
2091
|
+
type: "authentication_error";
|
|
2092
|
+
/** @constant */
|
|
2093
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
2094
|
+
message: string;
|
|
2095
|
+
details?: string;
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
2100
|
+
/** @description The specified Devbox does not exist. */
|
|
2101
|
+
404: {
|
|
2102
|
+
headers: {
|
|
2103
|
+
[name: string]: unknown;
|
|
2104
|
+
};
|
|
2105
|
+
content: {
|
|
2106
|
+
"application/json": {
|
|
2107
|
+
error: {
|
|
2108
|
+
/** @constant */
|
|
2109
|
+
type: "resource_error";
|
|
2110
|
+
/** @constant */
|
|
2111
|
+
code: "NOT_FOUND";
|
|
2112
|
+
message: string;
|
|
2113
|
+
details?: string;
|
|
2114
|
+
};
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
};
|
|
2118
|
+
/** @description Failed to query deployments. */
|
|
2119
|
+
500: {
|
|
2120
|
+
headers: {
|
|
2121
|
+
[name: string]: unknown;
|
|
2122
|
+
};
|
|
2123
|
+
content: {
|
|
2124
|
+
"application/json": {
|
|
2125
|
+
error: {
|
|
2126
|
+
/** @enum {string} */
|
|
2127
|
+
type: "internal_error";
|
|
2128
|
+
/** @enum {string} */
|
|
2129
|
+
code: "INTERNAL_ERROR";
|
|
2130
|
+
message: string;
|
|
2131
|
+
details?: string;
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
deleteDevboxRelease: {
|
|
2139
|
+
parameters: {
|
|
2140
|
+
query?: never;
|
|
2141
|
+
header?: never;
|
|
2142
|
+
path: {
|
|
2143
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2144
|
+
name: string;
|
|
2145
|
+
/** @description Release version tag (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2146
|
+
tag: string;
|
|
2147
|
+
};
|
|
2148
|
+
cookie?: never;
|
|
2149
|
+
};
|
|
2150
|
+
requestBody?: never;
|
|
2151
|
+
responses: {
|
|
2152
|
+
/** @description Release deleted successfully, or did not exist (idempotent). */
|
|
2153
|
+
204: {
|
|
2154
|
+
headers: {
|
|
2155
|
+
[name: string]: unknown;
|
|
2156
|
+
};
|
|
2157
|
+
content?: never;
|
|
2158
|
+
};
|
|
2159
|
+
/** @description Invalid path parameters. */
|
|
2160
|
+
400: {
|
|
2161
|
+
headers: {
|
|
2162
|
+
[name: string]: unknown;
|
|
2163
|
+
};
|
|
2164
|
+
content: {
|
|
2165
|
+
"application/json": {
|
|
2166
|
+
error: {
|
|
2167
|
+
/** @enum {string} */
|
|
2168
|
+
type: "validation_error";
|
|
2169
|
+
/** @enum {string} */
|
|
2170
|
+
code: "INVALID_PARAMETER";
|
|
2171
|
+
message: string;
|
|
2172
|
+
details?: {
|
|
2173
|
+
field: string;
|
|
2174
|
+
message: string;
|
|
2175
|
+
}[] | string;
|
|
2176
|
+
};
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2179
|
+
};
|
|
2180
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
2181
|
+
401: {
|
|
2182
|
+
headers: {
|
|
2183
|
+
[name: string]: unknown;
|
|
2184
|
+
};
|
|
2185
|
+
content: {
|
|
2186
|
+
"application/json": {
|
|
2187
|
+
error: {
|
|
2188
|
+
/** @constant */
|
|
2189
|
+
type: "authentication_error";
|
|
2190
|
+
/** @constant */
|
|
2191
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
2192
|
+
message: string;
|
|
2193
|
+
details?: string;
|
|
2194
|
+
};
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
};
|
|
2198
|
+
/** @description Failed to delete the release. */
|
|
2199
|
+
500: {
|
|
2200
|
+
headers: {
|
|
2201
|
+
[name: string]: unknown;
|
|
2202
|
+
};
|
|
2203
|
+
content: {
|
|
2204
|
+
"application/json": {
|
|
2205
|
+
error: {
|
|
2206
|
+
/** @enum {string} */
|
|
2207
|
+
type: "internal_error";
|
|
2208
|
+
/** @enum {string} */
|
|
2209
|
+
code: "INTERNAL_ERROR";
|
|
2210
|
+
message: string;
|
|
2211
|
+
details?: string;
|
|
2212
|
+
};
|
|
2213
|
+
};
|
|
2214
|
+
};
|
|
2215
|
+
};
|
|
2216
|
+
};
|
|
2217
|
+
};
|
|
2218
|
+
deployDevboxRelease: {
|
|
2219
|
+
parameters: {
|
|
2220
|
+
query?: never;
|
|
2221
|
+
header?: never;
|
|
2222
|
+
path: {
|
|
2223
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2224
|
+
name: string;
|
|
2225
|
+
/** @description Release version tag (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2226
|
+
tag: string;
|
|
2227
|
+
};
|
|
2228
|
+
cookie?: never;
|
|
2229
|
+
};
|
|
2230
|
+
requestBody?: never;
|
|
2231
|
+
responses: {
|
|
2232
|
+
/** @description Release deployed successfully. Application is now running in AppLaunchpad. */
|
|
2233
|
+
204: {
|
|
2234
|
+
headers: {
|
|
2235
|
+
[name: string]: unknown;
|
|
2236
|
+
};
|
|
2237
|
+
content?: never;
|
|
2238
|
+
};
|
|
2239
|
+
/** @description Invalid path parameters. */
|
|
2240
|
+
400: {
|
|
2241
|
+
headers: {
|
|
2242
|
+
[name: string]: unknown;
|
|
2243
|
+
};
|
|
2244
|
+
content: {
|
|
2245
|
+
"application/json": {
|
|
2246
|
+
error: {
|
|
2247
|
+
/** @enum {string} */
|
|
2248
|
+
type: "validation_error";
|
|
2249
|
+
/** @enum {string} */
|
|
2250
|
+
code: "INVALID_PARAMETER";
|
|
2251
|
+
message: string;
|
|
2252
|
+
details?: {
|
|
2253
|
+
field: string;
|
|
2254
|
+
message: string;
|
|
2255
|
+
}[] | string;
|
|
2256
|
+
};
|
|
2257
|
+
};
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
2260
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
2261
|
+
401: {
|
|
2262
|
+
headers: {
|
|
2263
|
+
[name: string]: unknown;
|
|
2264
|
+
};
|
|
2265
|
+
content: {
|
|
2266
|
+
"application/json": {
|
|
2267
|
+
error: {
|
|
2268
|
+
/** @constant */
|
|
2269
|
+
type: "authentication_error";
|
|
2270
|
+
/** @constant */
|
|
2271
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
2272
|
+
message: string;
|
|
2273
|
+
details?: string;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
/** @description Devbox or release tag not found, or release is not in Success status. */
|
|
2279
|
+
404: {
|
|
2280
|
+
headers: {
|
|
2281
|
+
[name: string]: unknown;
|
|
2282
|
+
};
|
|
2283
|
+
content: {
|
|
2284
|
+
"application/json": {
|
|
2285
|
+
error: {
|
|
2286
|
+
/** @constant */
|
|
2287
|
+
type: "resource_error";
|
|
2288
|
+
/** @constant */
|
|
2289
|
+
code: "NOT_FOUND";
|
|
2290
|
+
message: string;
|
|
2291
|
+
details?: string;
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
};
|
|
2296
|
+
/** @description Deployment failed. */
|
|
2297
|
+
500: {
|
|
2298
|
+
headers: {
|
|
2299
|
+
[name: string]: unknown;
|
|
2300
|
+
};
|
|
2301
|
+
content: {
|
|
2302
|
+
"application/json": {
|
|
2303
|
+
error: {
|
|
2304
|
+
/** @enum {string} */
|
|
2305
|
+
type: "operation_error" | "internal_error";
|
|
2306
|
+
/** @enum {string} */
|
|
2307
|
+
code: "OPERATION_FAILED" | "INTERNAL_ERROR";
|
|
2308
|
+
message: string;
|
|
2309
|
+
details?: string;
|
|
2310
|
+
};
|
|
2311
|
+
};
|
|
2312
|
+
};
|
|
2313
|
+
};
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
getDevboxMonitor: {
|
|
2317
|
+
parameters: {
|
|
2318
|
+
query?: {
|
|
2319
|
+
/** @description Start of the monitoring window. Accepts a Unix timestamp in either **seconds** or **milliseconds** (values > 10¹² are automatically divided by 1000). Defaults to `end − 3 h`. */
|
|
2320
|
+
start?: string;
|
|
2321
|
+
/** @description End of the monitoring window. Accepts a Unix timestamp in either **seconds** or **milliseconds** (values > 10¹² are automatically divided by 1000). Defaults to the current server time. */
|
|
2322
|
+
end?: string;
|
|
2323
|
+
/** @description Sampling interval (e.g. `1m`, `5m`, `1h`). */
|
|
2324
|
+
step?: string;
|
|
2325
|
+
};
|
|
2326
|
+
header?: never;
|
|
2327
|
+
path: {
|
|
2328
|
+
/** @description Devbox name (format: lowercase alphanumeric with hyphens, 1–63 characters) */
|
|
2329
|
+
name: string;
|
|
2330
|
+
};
|
|
2331
|
+
cookie?: never;
|
|
2332
|
+
};
|
|
2333
|
+
requestBody?: never;
|
|
2334
|
+
responses: {
|
|
2335
|
+
/** @description Monitoring data retrieved successfully. */
|
|
2336
|
+
200: {
|
|
2337
|
+
headers: {
|
|
2338
|
+
[name: string]: unknown;
|
|
2339
|
+
};
|
|
2340
|
+
content: {
|
|
2341
|
+
"application/json": {
|
|
2342
|
+
/**
|
|
2343
|
+
* @description Unix timestamp in seconds
|
|
2344
|
+
* @example 1760510280
|
|
2345
|
+
*/
|
|
2346
|
+
timestamp: number;
|
|
2347
|
+
/**
|
|
2348
|
+
* @description Formatted timestamp in YYYY/MM/DD HH:mm
|
|
2349
|
+
* @example 2025/10/15 14:38
|
|
2350
|
+
*/
|
|
2351
|
+
readableTime: string;
|
|
2352
|
+
/**
|
|
2353
|
+
* @description CPU utilisation percentage
|
|
2354
|
+
* @example 1.08
|
|
2355
|
+
*/
|
|
2356
|
+
cpu: number;
|
|
2357
|
+
/**
|
|
2358
|
+
* @description Memory utilisation percentage
|
|
2359
|
+
* @example 10.32
|
|
2360
|
+
*/
|
|
2361
|
+
memory: number;
|
|
2362
|
+
}[];
|
|
2363
|
+
};
|
|
2364
|
+
};
|
|
2365
|
+
/** @description Invalid devbox name or query parameters. */
|
|
2366
|
+
400: {
|
|
2367
|
+
headers: {
|
|
2368
|
+
[name: string]: unknown;
|
|
2369
|
+
};
|
|
2370
|
+
content: {
|
|
2371
|
+
"application/json": {
|
|
2372
|
+
error: {
|
|
2373
|
+
/** @enum {string} */
|
|
2374
|
+
type: "validation_error";
|
|
2375
|
+
/** @enum {string} */
|
|
2376
|
+
code: "INVALID_PARAMETER" | "INVALID_VALUE";
|
|
2377
|
+
message: string;
|
|
2378
|
+
details?: {
|
|
2379
|
+
field: string;
|
|
2380
|
+
message: string;
|
|
2381
|
+
}[] | string;
|
|
2382
|
+
};
|
|
2383
|
+
};
|
|
2384
|
+
};
|
|
2385
|
+
};
|
|
2386
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
2387
|
+
401: {
|
|
2388
|
+
headers: {
|
|
2389
|
+
[name: string]: unknown;
|
|
2390
|
+
};
|
|
2391
|
+
content: {
|
|
2392
|
+
"application/json": {
|
|
2393
|
+
error: {
|
|
2394
|
+
/** @constant */
|
|
2395
|
+
type: "authentication_error";
|
|
2396
|
+
/** @constant */
|
|
2397
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
2398
|
+
message: string;
|
|
2399
|
+
details?: string;
|
|
2400
|
+
};
|
|
2401
|
+
};
|
|
2402
|
+
};
|
|
2403
|
+
};
|
|
2404
|
+
/** @description Failed to fetch monitoring data. */
|
|
2405
|
+
500: {
|
|
2406
|
+
headers: {
|
|
2407
|
+
[name: string]: unknown;
|
|
2408
|
+
};
|
|
2409
|
+
content: {
|
|
2410
|
+
"application/json": {
|
|
2411
|
+
error: {
|
|
2412
|
+
/** @enum {string} */
|
|
2413
|
+
type: "internal_error";
|
|
2414
|
+
/** @enum {string} */
|
|
2415
|
+
code: "INTERNAL_ERROR";
|
|
2416
|
+
message: string;
|
|
2417
|
+
details?: string;
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
};
|
|
2424
|
+
listDevboxTemplates: {
|
|
2425
|
+
parameters: {
|
|
2426
|
+
query?: never;
|
|
2427
|
+
header?: never;
|
|
2428
|
+
path?: never;
|
|
2429
|
+
cookie?: never;
|
|
2430
|
+
};
|
|
2431
|
+
requestBody?: never;
|
|
2432
|
+
responses: {
|
|
2433
|
+
/** @description Template list retrieved successfully. */
|
|
2434
|
+
200: {
|
|
2435
|
+
headers: {
|
|
2436
|
+
[name: string]: unknown;
|
|
2437
|
+
};
|
|
2438
|
+
content: {
|
|
2439
|
+
"application/json": {
|
|
2440
|
+
/** @description Runtime name (from iconId or repository uid) */
|
|
2441
|
+
runtime: string;
|
|
2442
|
+
/** @description Parsed template configuration */
|
|
2443
|
+
config: {
|
|
2444
|
+
appPorts?: {
|
|
2445
|
+
name: string;
|
|
2446
|
+
port: number;
|
|
2447
|
+
protocol: string;
|
|
2448
|
+
}[];
|
|
2449
|
+
ports?: {
|
|
2450
|
+
containerPort: number;
|
|
2451
|
+
name: string;
|
|
2452
|
+
protocol: string;
|
|
2453
|
+
}[];
|
|
2454
|
+
releaseArgs?: string[];
|
|
2455
|
+
releaseCommand?: string[];
|
|
2456
|
+
user?: string;
|
|
2457
|
+
workingDir?: string;
|
|
2458
|
+
};
|
|
2459
|
+
}[];
|
|
2460
|
+
};
|
|
2461
|
+
};
|
|
2462
|
+
/** @description No valid credentials provided, or credentials have expired. */
|
|
2463
|
+
401: {
|
|
2464
|
+
headers: {
|
|
2465
|
+
[name: string]: unknown;
|
|
2466
|
+
};
|
|
2467
|
+
content: {
|
|
2468
|
+
"application/json": {
|
|
2469
|
+
error: {
|
|
2470
|
+
/** @constant */
|
|
2471
|
+
type: "authentication_error";
|
|
2472
|
+
/** @constant */
|
|
2473
|
+
code: "AUTHENTICATION_REQUIRED";
|
|
2474
|
+
message: string;
|
|
2475
|
+
details?: string;
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
/** @description Failed to retrieve the template list. */
|
|
2481
|
+
500: {
|
|
2482
|
+
headers: {
|
|
2483
|
+
[name: string]: unknown;
|
|
2484
|
+
};
|
|
2485
|
+
content: {
|
|
2486
|
+
"application/json": {
|
|
2487
|
+
error: {
|
|
2488
|
+
/** @enum {string} */
|
|
2489
|
+
type: "internal_error";
|
|
2490
|
+
/** @enum {string} */
|
|
2491
|
+
code: "INTERNAL_ERROR";
|
|
2492
|
+
message: string;
|
|
2493
|
+
details?: string;
|
|
2494
|
+
};
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
};
|
|
2498
|
+
};
|
|
2499
|
+
};
|
|
2500
|
+
}
|