@archildata/api-types 0.0.12 → 0.0.14

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.
Files changed (2) hide show
  1. package/index.d.ts +148 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -248,6 +248,27 @@ export interface paths {
248
248
  patch?: never;
249
249
  trace?: never;
250
250
  };
251
+ "/api/disks/{id}/share": {
252
+ parameters: {
253
+ query?: never;
254
+ header?: never;
255
+ path?: never;
256
+ cookie?: never;
257
+ };
258
+ get?: never;
259
+ put?: never;
260
+ /**
261
+ * Create a share URL for a file
262
+ * @description Creates a signed, time-limited URL for downloading a file without
263
+ * authentication. The URL expires after 24 hours by default.
264
+ */
265
+ post: operations["createShareUrl"];
266
+ delete?: never;
267
+ options?: never;
268
+ head?: never;
269
+ patch?: never;
270
+ trace?: never;
271
+ };
251
272
  "/api/exec": {
252
273
  parameters: {
253
274
  query?: never;
@@ -361,7 +382,7 @@ export interface paths {
361
382
  post?: never;
362
383
  /**
363
384
  * Delete a sandbox
364
- * @description Permanently deletes a stopped, exited, or failed sandbox.
385
+ * @description Permanently deletes a stopped, exited, or failed sandbox and its backing disk. A sandbox with child forks cannot be deleted until those children are deleted, starting with the deepest ones.
365
386
  */
366
387
  delete: operations["deleteSandbox"];
367
388
  options?: never;
@@ -459,6 +480,31 @@ export interface paths {
459
480
  patch?: never;
460
481
  trace?: never;
461
482
  };
483
+ "/api/sandboxes/{sid}/fork": {
484
+ parameters: {
485
+ query?: never;
486
+ header?: never;
487
+ path?: never;
488
+ cookie?: never;
489
+ };
490
+ get?: never;
491
+ put?: never;
492
+ /**
493
+ * Fork a sandbox
494
+ * @description Checkpoints a running source sandbox and creates an isolated writable
495
+ * disk branch. Forks from running or paused sources resume from the
496
+ * source's CPU, memory, and disk state. Forks from stopped sources
497
+ * cold-boot from the saved disk checkpoint. A running source is
498
+ * resumed after its checkpoint; paused and stopped sources remain
499
+ * inactive. Forked sandboxes may themselves be forked.
500
+ */
501
+ post: operations["forkSandbox"];
502
+ delete?: never;
503
+ options?: never;
504
+ head?: never;
505
+ patch?: never;
506
+ trace?: never;
507
+ };
462
508
  "/api/sandboxes/{sid}/resume": {
463
509
  parameters: {
464
510
  query?: never;
@@ -516,11 +562,11 @@ export interface paths {
516
562
  get?: never;
517
563
  put?: never;
518
564
  /**
519
- * Stop a sandbox without saving memory
520
- * @description Shuts down the VM without creating a memory snapshot. When the sandbox
521
- * is paused, this invalidates its committed snapshot and changes it to
522
- * `stopped`. The sandbox's identity, configuration, and disk state remain
523
- * available for a later cold start.
565
+ * Stop a sandbox
566
+ * @description Gracefully shuts down the guest, then checkpoints its disk before
567
+ * entering `stopped`. The sandbox and any forks from it cold-boot from
568
+ * disk state. Stopping a paused sandbox reuses its existing disk
569
+ * checkpoint. In-flight execs receive the guest shutdown signal.
524
570
  */
525
571
  post: operations["stopSandbox"];
526
572
  delete?: never;
@@ -672,6 +718,10 @@ export interface components {
672
718
  max_ttl_seconds?: number;
673
719
  max_concurrent_execs?: number;
674
720
  };
721
+ ForkSandboxRequest: {
722
+ /** @description Name for the fork. A random word-list name is generated when omitted. */
723
+ name?: string;
724
+ };
675
725
  SandboxExecRequest: {
676
726
  /** @description Shell command, run via `/bin/sh -c` */
677
727
  command: string;
@@ -1151,6 +1201,22 @@ export interface components {
1151
1201
  success: boolean;
1152
1202
  data: components["schemas"]["AuthorizedUser"];
1153
1203
  };
1204
+ CreateShareUrlRequest: {
1205
+ /** @description File key within the disk. */
1206
+ key: string;
1207
+ /** @description URL lifetime in seconds. Defaults to 86400 (24 hours). */
1208
+ expiresIn?: number;
1209
+ };
1210
+ ApiResponse_ShareUrl: {
1211
+ /** @example true */
1212
+ success: boolean;
1213
+ data: {
1214
+ /** Format: uri */
1215
+ url: string;
1216
+ /** @description URL lifetime in seconds. */
1217
+ expiresIn: number;
1218
+ };
1219
+ };
1154
1220
  ApiResponse_AllowedIPs: {
1155
1221
  /** @example true */
1156
1222
  success: boolean;
@@ -1985,6 +2051,37 @@ export interface operations {
1985
2051
  500: components["responses"]["InternalError"];
1986
2052
  };
1987
2053
  };
2054
+ createShareUrl: {
2055
+ parameters: {
2056
+ query?: never;
2057
+ header?: never;
2058
+ path: {
2059
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
2060
+ id: components["parameters"]["DiskId"];
2061
+ };
2062
+ cookie?: never;
2063
+ };
2064
+ requestBody: {
2065
+ content: {
2066
+ "application/json": components["schemas"]["CreateShareUrlRequest"];
2067
+ };
2068
+ };
2069
+ responses: {
2070
+ /** @description Share URL created */
2071
+ 200: {
2072
+ headers: {
2073
+ [name: string]: unknown;
2074
+ };
2075
+ content: {
2076
+ "application/json": components["schemas"]["ApiResponse_ShareUrl"];
2077
+ };
2078
+ };
2079
+ 400: components["responses"]["ValidationError"];
2080
+ 401: components["responses"]["Unauthorized"];
2081
+ 404: components["responses"]["NotFound"];
2082
+ 500: components["responses"]["InternalError"];
2083
+ };
2084
+ };
1988
2085
  exec: {
1989
2086
  parameters: {
1990
2087
  query?: never;
@@ -2223,7 +2320,7 @@ export interface operations {
2223
2320
  };
2224
2321
  401: components["responses"]["Unauthorized"];
2225
2322
  404: components["responses"]["NotFound"];
2226
- /** @description The sandbox must be stopped, exited, or failed before it can be deleted */
2323
+ /** @description The sandbox must be stopped, exited, or failed and have no child forks. The error includes the number of child disks and up to 10 disk IDs that must be deleted first. */
2227
2324
  409: {
2228
2325
  headers: {
2229
2326
  [name: string]: unknown;
@@ -2415,6 +2512,50 @@ export interface operations {
2415
2512
  503: components["responses"]["RetryableUnavailable"];
2416
2513
  };
2417
2514
  };
2515
+ forkSandbox: {
2516
+ parameters: {
2517
+ query?: {
2518
+ /** @description Hold the request for a completed start or exec result */
2519
+ wait?: components["parameters"]["Wait"];
2520
+ };
2521
+ header?: never;
2522
+ path: {
2523
+ /** @description Sandbox UUID */
2524
+ sid: components["parameters"]["SandboxId"];
2525
+ };
2526
+ cookie?: never;
2527
+ };
2528
+ requestBody?: {
2529
+ content: {
2530
+ "application/json": components["schemas"]["ForkSandboxRequest"];
2531
+ };
2532
+ };
2533
+ responses: {
2534
+ /** @description The fork was created and its start is pending */
2535
+ 202: {
2536
+ headers: {
2537
+ [name: string]: unknown;
2538
+ };
2539
+ content: {
2540
+ "application/json": components["schemas"]["ApiResponse_Sandbox"];
2541
+ };
2542
+ };
2543
+ 400: components["responses"]["ValidationError"];
2544
+ 401: components["responses"]["Unauthorized"];
2545
+ 404: components["responses"]["NotFound"];
2546
+ /** @description The source cannot be paused or its fork checkpoint is unavailable */
2547
+ 409: {
2548
+ headers: {
2549
+ [name: string]: unknown;
2550
+ };
2551
+ content: {
2552
+ "application/json": components["schemas"]["ErrorResponse"];
2553
+ };
2554
+ };
2555
+ 500: components["responses"]["InternalError"];
2556
+ 503: components["responses"]["RetryableUnavailable"];
2557
+ };
2558
+ };
2418
2559
  resumeSandbox: {
2419
2560
  parameters: {
2420
2561
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",