@archildata/api-types 0.0.42 → 0.0.44

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 +161 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -4,6 +4,26 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
+ "/api/billing/summary": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Get billing summary
16
+ * @description Returns the selected account's billing state and available actions.
17
+ */
18
+ get: operations["getBillingSummary"];
19
+ put?: never;
20
+ post?: never;
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
26
+ };
7
27
  "/api/activity": {
8
28
  parameters: {
9
29
  query?: never;
@@ -664,7 +684,8 @@ export interface paths {
664
684
  * was paused, its memory snapshot is consumed and discarded before the
665
685
  * new VM runs; disk state remains. Starting a running sandbox or a pending
666
686
  * cold start is idempotent. A sandbox that is stopping, pausing, or
667
- * pending a resume returns 409.
687
+ * pending a resume returns 409. An optional body replaces the sandbox's
688
+ * disk mounts for this and later sessions.
668
689
  */
669
690
  post: operations["startSandbox"];
670
691
  delete?: never;
@@ -708,6 +729,78 @@ export interface components {
708
729
  /** @description Stable machine-readable error code. */
709
730
  code?: string;
710
731
  };
732
+ BillingOwner: {
733
+ /** @description Selected account ID; linked accounts may share a Stripe customer. */
734
+ accountId: string;
735
+ /** @enum {string} */
736
+ type: "personal" | "organization";
737
+ };
738
+ BillingPeriod: {
739
+ /**
740
+ * Format: int64
741
+ * @description Unix timestamp in seconds.
742
+ */
743
+ start: number;
744
+ /**
745
+ * Format: int64
746
+ * @description Unix timestamp in seconds.
747
+ */
748
+ end: number;
749
+ };
750
+ BillingScheduledChange: {
751
+ /** @enum {string} */
752
+ type: "schedule_transition" | "plan_change";
753
+ /**
754
+ * Format: int64
755
+ * @description Unix timestamp in seconds.
756
+ */
757
+ effectiveAt: number;
758
+ /** @enum {string} */
759
+ targetPlan?: "developer" | "team" | "enterprise";
760
+ };
761
+ BillingPaymentHealth: {
762
+ /** @enum {string} */
763
+ status: "not_applicable" | "invoice_open" | "action_required" | "missing_payment_method" | "healthy";
764
+ hasDefaultPaymentMethod: boolean;
765
+ openInvoiceId?: string;
766
+ /** Format: int64 */
767
+ amountRemainingCents?: number;
768
+ openInvoiceCurrency?: string;
769
+ };
770
+ BillingSummaryActions: {
771
+ canStartCheckout: boolean;
772
+ canManagePaymentMethods: boolean;
773
+ canUpdateBillingProfile: boolean;
774
+ canViewInvoices: boolean;
775
+ canChangePlan: boolean;
776
+ canCancel: boolean;
777
+ canKeepSubscription: boolean;
778
+ canPayOpenInvoice: boolean;
779
+ };
780
+ BillingSummary: {
781
+ billingOwner: components["schemas"]["BillingOwner"];
782
+ /** @enum {string} */
783
+ billingMode: "not_setup" | "self_serve" | "managed";
784
+ /** @enum {string} */
785
+ plan: "developer" | "team" | "enterprise" | "unknown";
786
+ /** @description Stripe subscription status, `none`, or `managed`. */
787
+ subscriptionStatus: string;
788
+ billingPeriod?: components["schemas"]["BillingPeriod"];
789
+ /**
790
+ * Format: int64
791
+ * @description Unix timestamp in seconds.
792
+ */
793
+ scheduledCancellationAt?: number;
794
+ scheduledChange?: components["schemas"]["BillingScheduledChange"];
795
+ hasPendingUpdate: boolean;
796
+ paymentHealth: components["schemas"]["BillingPaymentHealth"];
797
+ actions: components["schemas"]["BillingSummaryActions"];
798
+ };
799
+ ApiResponse_BillingSummary: {
800
+ /** @example true */
801
+ success: boolean;
802
+ data: components["schemas"]["BillingSummary"];
803
+ };
711
804
  ActivityEvent: {
712
805
  accountId: string;
713
806
  /**
@@ -823,6 +916,7 @@ export interface components {
823
916
  * @default false
824
917
  */
825
918
  enable_service_ingress: boolean;
919
+ mounts?: components["schemas"]["SandboxMount"][];
826
920
  /** Format: date-time */
827
921
  created_at: string;
828
922
  /** Format: date-time */
@@ -840,6 +934,22 @@ export interface components {
840
934
  */
841
935
  checkpoint?: string;
842
936
  };
937
+ SandboxMount: {
938
+ disk_id: string;
939
+ /** @description Absolute guest directory to mount at. Required when more than one disk is mounted; a sole mount defaults to /mnt/archil. Guest system directories (/usr, /etc, /var, /opt, ...) are reserved, and a disk can be mounted once per sandbox. */
940
+ path?: string;
941
+ /** @description Relative subdirectory of the disk to expose instead of its root. */
942
+ subdirectory?: string;
943
+ /** @default false */
944
+ read_only: boolean;
945
+ /**
946
+ * @description Send mutating operations directly to the server without a delegation checkout, allowing concurrent writers.
947
+ * @default false
948
+ */
949
+ conditional: boolean;
950
+ /** @description Milliseconds to wait for the disk's exclusive root delegation before the mount fails. Not allowed with read_only or conditional. */
951
+ queue_ms?: number;
952
+ };
843
953
  SandboxEndpoint: {
844
954
  port: number;
845
955
  hostname: string;
@@ -953,6 +1063,8 @@ export interface components {
953
1063
  [key: string]: string;
954
1064
  };
955
1065
  network?: components["schemas"]["SandboxNetwork"];
1066
+ /** @description Archil disks mounted inside the guest for the first session; `start` can replace them for later sessions. Inherited by forks. A sandbox with mounts must be stopped before it can be forked. */
1067
+ mounts?: components["schemas"]["SandboxMount"][];
956
1068
  /**
957
1069
  * @description Lifetime budget applied independently to each powered-on session. Expiry pauses the sandbox, preserving memory and processes for resume.
958
1070
  * @default 86400
@@ -963,6 +1075,10 @@ export interface components {
963
1075
  /** @description Maximum number of concurrently attached process sessions. Detached processes and one-shot process controls do not count. */
964
1076
  max_concurrent_execs?: number;
965
1077
  };
1078
+ StartSandboxRequest: {
1079
+ /** @description Replace the sandbox's disk mounts for this and later sessions. Omit to keep the current ones. Not accepted by resume, and 409 while the sandbox is running or pending. */
1080
+ mounts?: components["schemas"]["SandboxMount"][];
1081
+ };
966
1082
  ForkSandboxRequest: {
967
1083
  /** @description Name for the fork. A random word-list name is generated when omitted. */
968
1084
  name?: string;
@@ -1863,6 +1979,44 @@ export interface components {
1863
1979
  }
1864
1980
  export type $defs = Record<string, never>;
1865
1981
  export interface operations {
1982
+ getBillingSummary: {
1983
+ parameters: {
1984
+ query?: never;
1985
+ header?: never;
1986
+ path?: never;
1987
+ cookie?: never;
1988
+ };
1989
+ requestBody?: never;
1990
+ responses: {
1991
+ /** @description Billing summary */
1992
+ 200: {
1993
+ headers: {
1994
+ [name: string]: unknown;
1995
+ };
1996
+ content: {
1997
+ "application/json": components["schemas"]["ApiResponse_BillingSummary"];
1998
+ };
1999
+ };
2000
+ /** @description Missing, invalid, or disallowed credential */
2001
+ 401: {
2002
+ headers: {
2003
+ [name: string]: unknown;
2004
+ };
2005
+ content: {
2006
+ "text/plain": string;
2007
+ };
2008
+ };
2009
+ /** @description Billing data could not be loaded */
2010
+ 502: {
2011
+ headers: {
2012
+ [name: string]: unknown;
2013
+ };
2014
+ content: {
2015
+ "application/json": components["schemas"]["ErrorResponse"];
2016
+ };
2017
+ };
2018
+ };
2019
+ };
1866
2020
  listActivity: {
1867
2021
  parameters: {
1868
2022
  query?: {
@@ -2515,6 +2669,7 @@ export interface operations {
2515
2669
  };
2516
2670
  400: components["responses"]["ValidationError"];
2517
2671
  401: components["responses"]["Unauthorized"];
2672
+ 404: components["responses"]["NotFound"];
2518
2673
  /** @description The requested sandbox name already exists in the account */
2519
2674
  409: {
2520
2675
  headers: {
@@ -3104,7 +3259,11 @@ export interface operations {
3104
3259
  };
3105
3260
  cookie?: never;
3106
3261
  };
3107
- requestBody?: never;
3262
+ requestBody?: {
3263
+ content: {
3264
+ "application/json": components["schemas"]["StartSandboxRequest"];
3265
+ };
3266
+ };
3108
3267
  responses: {
3109
3268
  /** @description The sandbox was already running */
3110
3269
  200: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",