@archildata/api-types 0.0.43 → 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 +130 -0
  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;
@@ -709,6 +729,78 @@ export interface components {
709
729
  /** @description Stable machine-readable error code. */
710
730
  code?: string;
711
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
+ };
712
804
  ActivityEvent: {
713
805
  accountId: string;
714
806
  /**
@@ -1887,6 +1979,44 @@ export interface components {
1887
1979
  }
1888
1980
  export type $defs = Record<string, never>;
1889
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
+ };
1890
2020
  listActivity: {
1891
2021
  parameters: {
1892
2022
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.43",
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",