@archildata/api-types 0.0.39 → 0.0.41

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 +222 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -459,6 +459,59 @@ export interface paths {
459
459
  patch?: never;
460
460
  trace?: never;
461
461
  };
462
+ "/api/sandboxes/{sid}/port-tokens": {
463
+ parameters: {
464
+ query?: never;
465
+ header?: never;
466
+ path?: never;
467
+ cookie?: never;
468
+ };
469
+ /**
470
+ * List sandbox port tokens
471
+ * @description Lists unexpired private port token metadata without returning raw tokens.
472
+ */
473
+ get: operations["listSandboxPortTokens"];
474
+ put?: never;
475
+ /**
476
+ * Create a private sandbox port token
477
+ * @description Creates token-authorized HTTP access to one port. Send the raw token returned
478
+ * by this request in the `X-Archil-Token` request header at the stable
479
+ * `<port>-<sandbox-route-id>.<zone>` hostname. Public ports accept connections
480
+ * without a token; otherwise a valid token for that sandbox and port is required.
481
+ * The token is not returned again.
482
+ */
483
+ post: operations["createSandboxPortToken"];
484
+ delete?: never;
485
+ options?: never;
486
+ head?: never;
487
+ patch?: never;
488
+ trace?: never;
489
+ };
490
+ "/api/sandboxes/{sid}/port-tokens/{token_id}": {
491
+ parameters: {
492
+ query?: never;
493
+ header?: never;
494
+ path?: never;
495
+ cookie?: never;
496
+ };
497
+ /**
498
+ * Get a sandbox port token
499
+ * @description Returns token metadata without its raw token. Expired tokens return not found.
500
+ */
501
+ get: operations["getSandboxPortToken"];
502
+ put?: never;
503
+ post?: never;
504
+ /**
505
+ * Revoke a sandbox port token
506
+ * @description New private connections using the token fail after this request
507
+ * completes; established connections remain open. Expired tokens return not found.
508
+ */
509
+ delete: operations["deleteSandboxPortToken"];
510
+ options?: never;
511
+ head?: never;
512
+ patch?: never;
513
+ trace?: never;
514
+ };
462
515
  "/api/sandboxes/{sid}/pause": {
463
516
  parameters: {
464
517
  query?: never;
@@ -806,6 +859,53 @@ export interface components {
806
859
  success: boolean;
807
860
  data: components["schemas"]["SandboxPortList"];
808
861
  };
862
+ SandboxPortToken: {
863
+ /** @description Stable token identifier used for get and revoke operations. */
864
+ id: string;
865
+ port: number;
866
+ /** Format: date-time */
867
+ created_at: string;
868
+ /**
869
+ * Format: date-time
870
+ * @description When the token expires. Absent for a non-expiring token.
871
+ */
872
+ expires_at?: string;
873
+ };
874
+ CreatedSandboxPortToken: components["schemas"]["SandboxPortToken"] & {
875
+ /** @description Stable sandbox port hostname, shared with public access. */
876
+ hostname: string;
877
+ /** @description Raw token returned only when the token is created. */
878
+ token: string;
879
+ };
880
+ CreateSandboxPortTokenRequest: {
881
+ port: number;
882
+ /**
883
+ * @description Token lifetime as a Go duration string (for example, "4m", "1h",
884
+ * or "24h"). Maximum 365 days ("8760h"). Omit for no expiration.
885
+ * @example 4m
886
+ */
887
+ ttl?: string;
888
+ };
889
+ SandboxPortTokenList: {
890
+ tokens: components["schemas"]["SandboxPortToken"][];
891
+ };
892
+ ApiResponse_CreatedSandboxPortToken: {
893
+ /** @example true */
894
+ success: boolean;
895
+ data: components["schemas"]["CreatedSandboxPortToken"];
896
+ };
897
+ ApiResponse_SandboxPortToken: {
898
+ /** @example true */
899
+ success: boolean;
900
+ data: components["schemas"]["SandboxPortToken"];
901
+ };
902
+ ApiResponse_SandboxPortTokenList: {
903
+ /** @example true */
904
+ success: boolean;
905
+ data: components["schemas"]["SandboxPortTokenList"];
906
+ /** @description Set when more port tokens remain. */
907
+ nextCursor?: string;
908
+ };
809
909
  SandboxConnection: {
810
910
  /** Format: uri */
811
911
  url: string;
@@ -902,6 +1002,13 @@ export interface components {
902
1002
  */
903
1003
  authMethods?: components["schemas"]["DiskUser"][];
904
1004
  rootAttrs?: components["schemas"]["RootAttrs"];
1005
+ /**
1006
+ * @description Minimum version required for connecting clients.
1007
+ * @example [
1008
+ * "1.2.3"
1009
+ * ]
1010
+ */
1011
+ minClientVersion?: string;
905
1012
  };
906
1013
  /** @description POSIX attributes for the disk's root directory, applied when the disk is created. Lets an unprivileged process own the mount root without a post-mount `chown`. Can only be set at creation; a later `chown`/`chmod` through a mount changes the live attributes as usual. Defaults to uid 0, gid 0, mode 0755. */
907
1014
  RootAttrs: {
@@ -2610,6 +2717,121 @@ export interface operations {
2610
2717
  500: components["responses"]["InternalError"];
2611
2718
  };
2612
2719
  };
2720
+ listSandboxPortTokens: {
2721
+ parameters: {
2722
+ query?: {
2723
+ /** @description Maximum number of items to return. Omit to return all items in a single unpaginated response; when set, the response may include a nextCursor to fetch the next page. */
2724
+ limit?: components["parameters"]["Limit"];
2725
+ /** @description Pagination cursor from a previous response */
2726
+ cursor?: components["parameters"]["Cursor"];
2727
+ };
2728
+ header?: never;
2729
+ path: {
2730
+ /** @description Sandbox UUID */
2731
+ sid: components["parameters"]["SandboxId"];
2732
+ };
2733
+ cookie?: never;
2734
+ };
2735
+ requestBody?: never;
2736
+ responses: {
2737
+ /** @description Sandbox port tokens */
2738
+ 200: {
2739
+ headers: {
2740
+ [name: string]: unknown;
2741
+ };
2742
+ content: {
2743
+ "application/json": components["schemas"]["ApiResponse_SandboxPortTokenList"];
2744
+ };
2745
+ };
2746
+ 400: components["responses"]["ValidationError"];
2747
+ 401: components["responses"]["Unauthorized"];
2748
+ 404: components["responses"]["NotFound"];
2749
+ 500: components["responses"]["InternalError"];
2750
+ };
2751
+ };
2752
+ createSandboxPortToken: {
2753
+ parameters: {
2754
+ query?: never;
2755
+ header?: never;
2756
+ path: {
2757
+ /** @description Sandbox UUID */
2758
+ sid: components["parameters"]["SandboxId"];
2759
+ };
2760
+ cookie?: never;
2761
+ };
2762
+ requestBody: {
2763
+ content: {
2764
+ "application/json": components["schemas"]["CreateSandboxPortTokenRequest"];
2765
+ };
2766
+ };
2767
+ responses: {
2768
+ /** @description Port token was created */
2769
+ 201: {
2770
+ headers: {
2771
+ [name: string]: unknown;
2772
+ };
2773
+ content: {
2774
+ "application/json": components["schemas"]["ApiResponse_CreatedSandboxPortToken"];
2775
+ };
2776
+ };
2777
+ 400: components["responses"]["ValidationError"];
2778
+ 401: components["responses"]["Unauthorized"];
2779
+ 404: components["responses"]["NotFound"];
2780
+ 500: components["responses"]["InternalError"];
2781
+ };
2782
+ };
2783
+ getSandboxPortToken: {
2784
+ parameters: {
2785
+ query?: never;
2786
+ header?: never;
2787
+ path: {
2788
+ /** @description Sandbox UUID */
2789
+ sid: components["parameters"]["SandboxId"];
2790
+ token_id: string;
2791
+ };
2792
+ cookie?: never;
2793
+ };
2794
+ requestBody?: never;
2795
+ responses: {
2796
+ /** @description Sandbox port token */
2797
+ 200: {
2798
+ headers: {
2799
+ [name: string]: unknown;
2800
+ };
2801
+ content: {
2802
+ "application/json": components["schemas"]["ApiResponse_SandboxPortToken"];
2803
+ };
2804
+ };
2805
+ 401: components["responses"]["Unauthorized"];
2806
+ 404: components["responses"]["NotFound"];
2807
+ 500: components["responses"]["InternalError"];
2808
+ };
2809
+ };
2810
+ deleteSandboxPortToken: {
2811
+ parameters: {
2812
+ query?: never;
2813
+ header?: never;
2814
+ path: {
2815
+ /** @description Sandbox UUID */
2816
+ sid: components["parameters"]["SandboxId"];
2817
+ token_id: string;
2818
+ };
2819
+ cookie?: never;
2820
+ };
2821
+ requestBody?: never;
2822
+ responses: {
2823
+ /** @description Port token was revoked */
2824
+ 204: {
2825
+ headers: {
2826
+ [name: string]: unknown;
2827
+ };
2828
+ content?: never;
2829
+ };
2830
+ 401: components["responses"]["Unauthorized"];
2831
+ 404: components["responses"]["NotFound"];
2832
+ 500: components["responses"]["InternalError"];
2833
+ };
2834
+ };
2613
2835
  pauseSandbox: {
2614
2836
  parameters: {
2615
2837
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",