@archildata/api-types 0.0.23 → 0.0.25

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 +117 -4
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -485,6 +485,35 @@ export interface paths {
485
485
  patch?: never;
486
486
  trace?: never;
487
487
  };
488
+ "/api/sandboxes/{sid}/network": {
489
+ parameters: {
490
+ query?: never;
491
+ header?: never;
492
+ path?: never;
493
+ cookie?: never;
494
+ };
495
+ /**
496
+ * Get a sandbox's network policy
497
+ * @description Returns the last committed network policy for a running, paused, or stopped sandbox.
498
+ */
499
+ get: operations["getSandboxNetwork"];
500
+ /**
501
+ * Replace a running sandbox's network policy
502
+ * @description Applies the complete replacement policy to a running sandbox, then
503
+ * records it as the current policy. A rejected update leaves the previous
504
+ * policy unchanged. An empty object restores unrestricted egress. Existing
505
+ * network sessions are not terminated; the replacement governs new
506
+ * connections and is retained across later stops and resumes. Sandboxes
507
+ * that are not running, or whose policy changes concurrently, return 409.
508
+ */
509
+ put: operations["updateSandboxNetwork"];
510
+ post?: never;
511
+ delete?: never;
512
+ options?: never;
513
+ head?: never;
514
+ patch?: never;
515
+ trace?: never;
516
+ };
488
517
  "/api/sandboxes/{sid}/start": {
489
518
  parameters: {
490
519
  query?: never;
@@ -590,14 +619,26 @@ export interface components {
590
619
  SandboxState: "pending" | "running" | "pausing" | "paused" | "stopping" | "stopped" | "exited" | "failed" | "deleting" | "deleted";
591
620
  /** @enum {string} */
592
621
  SandboxNetworkAction: "allow" | "deny";
593
- /** @description Deny targets take precedence when an address or domain matches both lists. Domain rules inspect TLS SNI on TCP port 443 without terminating TLS. When domain rules are present, DNS to the sandbox's configured resolvers is allowed and UDP port 443 is denied. */
622
+ /** @description Deny targets take precedence when an address or domain matches both lists. When domain rules are present, TCP ports 80 and 443 are restricted to HTTP/1.1 or HTTP/2. Plaintext HTTP authority is enforced on port 80, but requests matching a transformation rule are rejected. Port 443 is TLS-terminated; both TLS SNI and HTTP authority are evaluated, and the HTTP authority selects the upstream and any request transformations. DNS to the sandbox's configured resolvers is allowed and UDP port 443 is denied. */
594
623
  SandboxEgressPolicy: {
595
624
  default: components["schemas"]["SandboxNetworkAction"];
596
- /** @description Allowed IPv4 addresses, CIDR ranges, exact domains, or wildcard domains beginning with `*.`. A wildcard matches subdomains but not the apex domain. */
597
- allow?: string[];
625
+ /** @description Allowed IPv4 addresses, CIDR ranges, exact domains, wildcard domains beginning with `*.`, or target objects with optional outbound HTTPS request transformations. A wildcard matches subdomains but not the apex domain. A target with effective transformations must be an exact lowercase domain. */
626
+ allow?: (string | components["schemas"]["SandboxEgressRule"])[];
598
627
  /** @description Denied IPv4 addresses, CIDR ranges, exact domains, or wildcard domains beginning with `*.`. A wildcard matches subdomains but not the apex domain. */
599
628
  deny?: string[];
600
629
  };
630
+ SandboxEgressRule: {
631
+ /** @description Target allowed by this rule. Must be an exact lowercase domain when effective transformations are present. */
632
+ target: string;
633
+ transform?: components["schemas"]["SandboxEgressTransform"];
634
+ };
635
+ /** @description Optional outbound HTTPS request transformations. An omitted or empty transform leaves the rule as an ordinary allow without request mutations. */
636
+ SandboxEgressTransform: {
637
+ /** @description Outbound HTTPS request headers to set, overwriting values supplied by the sandbox. */
638
+ headers?: {
639
+ [key: string]: string;
640
+ };
641
+ };
601
642
  /** @description Sandbox network policy. Egress is unrestricted when omitted. */
602
643
  SandboxNetwork: {
603
644
  egress?: components["schemas"]["SandboxEgressPolicy"];
@@ -622,7 +663,6 @@ export interface components {
622
663
  */
623
664
  platform?: "arm64" | "amd64";
624
665
  endpoints?: components["schemas"]["SandboxEndpoint"][];
625
- network?: components["schemas"]["SandboxNetwork"];
626
666
  /** Format: date-time */
627
667
  created_at: string;
628
668
  /** Format: date-time */
@@ -663,6 +703,11 @@ export interface components {
663
703
  success: boolean;
664
704
  data: components["schemas"]["Sandbox"];
665
705
  };
706
+ ApiResponse_SandboxNetwork: {
707
+ /** @example true */
708
+ success: boolean;
709
+ data: components["schemas"]["SandboxNetwork"];
710
+ };
666
711
  CreateSandboxRequest: {
667
712
  /** @description Sandbox name, unique within the account. A random word-list name is generated when omitted. */
668
713
  name?: string;
@@ -2473,6 +2518,74 @@ export interface operations {
2473
2518
  503: components["responses"]["RetryableUnavailable"];
2474
2519
  };
2475
2520
  };
2521
+ getSandboxNetwork: {
2522
+ parameters: {
2523
+ query?: never;
2524
+ header?: never;
2525
+ path: {
2526
+ /** @description Sandbox UUID */
2527
+ sid: components["parameters"]["SandboxId"];
2528
+ };
2529
+ cookie?: never;
2530
+ };
2531
+ requestBody?: never;
2532
+ responses: {
2533
+ /** @description The last committed network policy */
2534
+ 200: {
2535
+ headers: {
2536
+ [name: string]: unknown;
2537
+ };
2538
+ content: {
2539
+ "application/json": components["schemas"]["ApiResponse_SandboxNetwork"];
2540
+ };
2541
+ };
2542
+ 401: components["responses"]["Unauthorized"];
2543
+ 404: components["responses"]["NotFound"];
2544
+ 500: components["responses"]["InternalError"];
2545
+ 503: components["responses"]["RetryableUnavailable"];
2546
+ };
2547
+ };
2548
+ updateSandboxNetwork: {
2549
+ parameters: {
2550
+ query?: never;
2551
+ header?: never;
2552
+ path: {
2553
+ /** @description Sandbox UUID */
2554
+ sid: components["parameters"]["SandboxId"];
2555
+ };
2556
+ cookie?: never;
2557
+ };
2558
+ requestBody: {
2559
+ content: {
2560
+ "application/json": components["schemas"]["SandboxNetwork"];
2561
+ };
2562
+ };
2563
+ responses: {
2564
+ /** @description The network policy was replaced */
2565
+ 200: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ "application/json": components["schemas"]["ApiResponse_SandboxNetwork"];
2571
+ };
2572
+ };
2573
+ 400: components["responses"]["ValidationError"];
2574
+ 401: components["responses"]["Unauthorized"];
2575
+ 404: components["responses"]["NotFound"];
2576
+ /** @description The sandbox is not running or the network policy changed concurrently */
2577
+ 409: {
2578
+ headers: {
2579
+ [name: string]: unknown;
2580
+ };
2581
+ content: {
2582
+ "application/json": components["schemas"]["ErrorResponse"];
2583
+ };
2584
+ };
2585
+ 500: components["responses"]["InternalError"];
2586
+ 503: components["responses"]["RetryableUnavailable"];
2587
+ };
2588
+ };
2476
2589
  startSandbox: {
2477
2590
  parameters: {
2478
2591
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",