@archildata/api-types 0.0.33 → 0.0.35

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 +170 -20
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -412,6 +412,50 @@ export interface paths {
412
412
  patch?: never;
413
413
  trace?: never;
414
414
  };
415
+ "/api/sandboxes/{sid}/ports": {
416
+ parameters: {
417
+ query?: never;
418
+ header?: never;
419
+ path?: never;
420
+ cookie?: never;
421
+ };
422
+ /**
423
+ * List exposed sandbox ports
424
+ * @description Lists the explicitly exposed public ports for the sandbox.
425
+ */
426
+ get: operations["listSandboxPorts"];
427
+ put?: never;
428
+ post?: never;
429
+ delete?: never;
430
+ options?: never;
431
+ head?: never;
432
+ patch?: never;
433
+ trace?: never;
434
+ };
435
+ "/api/sandboxes/{sid}/ports/{port}": {
436
+ parameters: {
437
+ query?: never;
438
+ header?: never;
439
+ path?: never;
440
+ cookie?: never;
441
+ };
442
+ get?: never;
443
+ /**
444
+ * Expose a sandbox port
445
+ * @description Creates or returns public access to a TCP port in the sandbox.
446
+ */
447
+ put: operations["exposeSandboxPort"];
448
+ post?: never;
449
+ /**
450
+ * Stop exposing a sandbox port
451
+ * @description Removes an explicitly exposed public port. An enabled sandbox service publishing the same TCP port remains publicly reachable.
452
+ */
453
+ delete: operations["deleteSandboxPort"];
454
+ options?: never;
455
+ head?: never;
456
+ patch?: never;
457
+ trace?: never;
458
+ };
415
459
  "/api/sandboxes/{sid}/pause": {
416
460
  parameters: {
417
461
  query?: never;
@@ -526,13 +570,15 @@ export interface paths {
526
570
  get?: never;
527
571
  put?: never;
528
572
  /**
529
- * Set a sandbox's timeout
530
- * @description Replaces the sandbox's lifetime budget and, while it is running, resets
531
- * its expiration deadline to the requested number of seconds from now.
532
- * The new budget is retained across later stops and starts. For an
533
- * inactive sandbox, it applies to the next powered-on session. Sandboxes
534
- * that are starting or shutting down, or whose timeout changes
535
- * concurrently, return 409.
573
+ * Set a sandbox's timeouts
574
+ * @description Replaces one or both sandbox timeout settings. Updating `timeout` while
575
+ * the sandbox is running resets its hard expiration deadline to that many
576
+ * seconds from now. Updating `idle_ttl_seconds` resets the idle
577
+ * countdown when no direct process connection is active; zero disables
578
+ * idle expiry. Omitted settings remain unchanged. Updates are retained
579
+ * across later stops and starts. For an inactive sandbox, they apply to
580
+ * the next powered-on session. Sandboxes that are starting or shutting
581
+ * down, or whose timeout changes concurrently, return 409.
536
582
  */
537
583
  post: operations["setSandboxTimeout"];
538
584
  delete?: never;
@@ -681,7 +727,9 @@ export interface components {
681
727
  };
682
728
  SandboxTimeoutRequest: {
683
729
  /** @description Seconds from now until a running sandbox expires, and the lifetime budget for its next powered-on session. */
684
- timeout: number;
730
+ timeout?: number;
731
+ /** @description Seconds without a direct process connection before the sandbox pauses. Zero disables idle expiry. */
732
+ idle_ttl_seconds?: number;
685
733
  };
686
734
  Sandbox: {
687
735
  /** Format: uuid */
@@ -693,6 +741,8 @@ export interface components {
693
741
  mem_size_mib: number;
694
742
  /** @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume. Defaults to 24 hours and can be reset with the timeout endpoint. */
695
743
  max_ttl_seconds: number;
744
+ /** @description Seconds without a direct process connection before the sandbox pauses, preserving memory and processes for resume. Zero disables idle expiry. */
745
+ idle_ttl_seconds: number;
696
746
  /** @description Maximum number of concurrently attached process sessions. Detached processes and one-shot process controls do not count. */
697
747
  max_concurrent_execs: number;
698
748
  /** @description OCI reference requested when the sandbox was created. */
@@ -702,6 +752,7 @@ export interface components {
702
752
  * @enum {string}
703
753
  */
704
754
  platform?: "arm64" | "amd64";
755
+ /** @description Public hostnames published by enabled sandbox services. */
705
756
  endpoints?: components["schemas"]["SandboxEndpoint"][];
706
757
  /** Format: date-time */
707
758
  created_at: string;
@@ -711,17 +762,29 @@ export interface components {
711
762
  finished_at?: string;
712
763
  /** Format: date-time */
713
764
  last_active_at: string;
714
- /**
715
- * Format: date-time
716
- * @description Current powered-on session deadline; absent while inactive.
717
- */
718
- expires_at?: string;
719
765
  exit_reason?: string;
720
766
  };
721
767
  SandboxEndpoint: {
722
768
  port: number;
723
769
  hostname: string;
724
770
  };
771
+ SandboxPort: {
772
+ port: number;
773
+ hostname: string;
774
+ };
775
+ SandboxPortList: {
776
+ ports: components["schemas"]["SandboxPort"][];
777
+ };
778
+ ApiResponse_SandboxPort: {
779
+ /** @example true */
780
+ success: boolean;
781
+ data: components["schemas"]["SandboxPort"];
782
+ };
783
+ ApiResponse_SandboxPortList: {
784
+ /** @example true */
785
+ success: boolean;
786
+ data: components["schemas"]["SandboxPortList"];
787
+ };
725
788
  SandboxConnection: {
726
789
  /** Format: uri */
727
790
  url: string;
@@ -733,11 +796,6 @@ export interface components {
733
796
  success: boolean;
734
797
  data: components["schemas"]["SandboxConnection"];
735
798
  };
736
- SandboxPortMapping: {
737
- container_port: number;
738
- /** @enum {string} */
739
- protocol: "tcp" | "udp";
740
- };
741
799
  ApiResponse_Sandbox: {
742
800
  /** @example true */
743
801
  success: boolean;
@@ -760,7 +818,8 @@ export interface components {
760
818
  * @default ubuntu:26.04
761
819
  */
762
820
  base_image: string;
763
- port_mappings?: components["schemas"]["SandboxPortMapping"][];
821
+ /** @description TCP ports to expose publicly when the sandbox is created. */
822
+ ports?: number[];
764
823
  /** @description Environment variables applied to every process */
765
824
  env?: {
766
825
  [key: string]: string;
@@ -771,6 +830,8 @@ export interface components {
771
830
  * @default 86400
772
831
  */
773
832
  max_ttl_seconds: number;
833
+ /** @description Pause after this many seconds without a direct process connection, preserving memory and processes for resume. Omit or set to zero to disable idle expiry. */
834
+ idle_ttl_seconds?: number;
774
835
  /** @description Maximum number of concurrently attached process sessions. Detached processes and one-shot process controls do not count. */
775
836
  max_concurrent_execs?: number;
776
837
  };
@@ -2426,6 +2487,95 @@ export interface operations {
2426
2487
  500: components["responses"]["InternalError"];
2427
2488
  };
2428
2489
  };
2490
+ listSandboxPorts: {
2491
+ parameters: {
2492
+ query?: never;
2493
+ header?: never;
2494
+ path: {
2495
+ /** @description Sandbox UUID */
2496
+ sid: components["parameters"]["SandboxId"];
2497
+ };
2498
+ cookie?: never;
2499
+ };
2500
+ requestBody?: never;
2501
+ responses: {
2502
+ /** @description Exposed sandbox ports */
2503
+ 200: {
2504
+ headers: {
2505
+ [name: string]: unknown;
2506
+ };
2507
+ content: {
2508
+ "application/json": components["schemas"]["ApiResponse_SandboxPortList"];
2509
+ };
2510
+ };
2511
+ 401: components["responses"]["Unauthorized"];
2512
+ 404: components["responses"]["NotFound"];
2513
+ 500: components["responses"]["InternalError"];
2514
+ };
2515
+ };
2516
+ exposeSandboxPort: {
2517
+ parameters: {
2518
+ query?: never;
2519
+ header?: never;
2520
+ path: {
2521
+ /** @description Sandbox UUID */
2522
+ sid: components["parameters"]["SandboxId"];
2523
+ port: number;
2524
+ };
2525
+ cookie?: never;
2526
+ };
2527
+ requestBody?: never;
2528
+ responses: {
2529
+ /** @description Existing exposed port */
2530
+ 200: {
2531
+ headers: {
2532
+ [name: string]: unknown;
2533
+ };
2534
+ content: {
2535
+ "application/json": components["schemas"]["ApiResponse_SandboxPort"];
2536
+ };
2537
+ };
2538
+ /** @description Port was exposed */
2539
+ 201: {
2540
+ headers: {
2541
+ [name: string]: unknown;
2542
+ };
2543
+ content: {
2544
+ "application/json": components["schemas"]["ApiResponse_SandboxPort"];
2545
+ };
2546
+ };
2547
+ 400: components["responses"]["ValidationError"];
2548
+ 401: components["responses"]["Unauthorized"];
2549
+ 404: components["responses"]["NotFound"];
2550
+ 500: components["responses"]["InternalError"];
2551
+ };
2552
+ };
2553
+ deleteSandboxPort: {
2554
+ parameters: {
2555
+ query?: never;
2556
+ header?: never;
2557
+ path: {
2558
+ /** @description Sandbox UUID */
2559
+ sid: components["parameters"]["SandboxId"];
2560
+ port: number;
2561
+ };
2562
+ cookie?: never;
2563
+ };
2564
+ requestBody?: never;
2565
+ responses: {
2566
+ /** @description Sandbox port is no longer explicitly exposed */
2567
+ 204: {
2568
+ headers: {
2569
+ [name: string]: unknown;
2570
+ };
2571
+ content?: never;
2572
+ };
2573
+ 400: components["responses"]["ValidationError"];
2574
+ 401: components["responses"]["Unauthorized"];
2575
+ 404: components["responses"]["NotFound"];
2576
+ 500: components["responses"]["InternalError"];
2577
+ };
2578
+ };
2429
2579
  pauseSandbox: {
2430
2580
  parameters: {
2431
2581
  query?: never;
@@ -2658,7 +2808,7 @@ export interface operations {
2658
2808
  };
2659
2809
  };
2660
2810
  responses: {
2661
- /** @description The sandbox timeout was set */
2811
+ /** @description The sandbox timeouts were set */
2662
2812
  200: {
2663
2813
  headers: {
2664
2814
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",