@archildata/api-types 0.0.48 → 0.0.50

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 +309 -10
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export interface paths {
13
13
  };
14
14
  /**
15
15
  * Get billing summary
16
- * @description Returns the selected account's billing state and available actions.
16
+ * @description Returns the selected account's billing state and available actions. Accounts that share billing also share subscription and open-invoice information.
17
17
  */
18
18
  get: operations["getBillingSummary"];
19
19
  put?: never;
@@ -74,8 +74,8 @@ export interface paths {
74
74
  get?: never;
75
75
  put?: never;
76
76
  /**
77
- * Start card setup with Stripe Elements
78
- * @description Confirm the returned SetupIntent with Stripe Elements in the client.
77
+ * Start card setup
78
+ * @description Use the returned clientSecret to confirm card details in the client's payment form.
79
79
  */
80
80
  post: operations["createBillingSetupIntent"];
81
81
  delete?: never;
@@ -93,8 +93,8 @@ export interface paths {
93
93
  };
94
94
  get?: never;
95
95
  /**
96
- * Set the default method for customer invoices and the current subscription
97
- * @description Provide a saved method ID or a succeeded SetupIntent ID. The method must belong to the authenticated account's Stripe customer. Existing invoice debt is not paid by this action. Accounts with multiple billable subscriptions require support review.
96
+ * Set the default payment method
97
+ * @description Provide a saved payment method ID or a completed card setup ID. The payment method must belong to the selected account. This action does not pay outstanding invoices. Accounts with multiple billable subscriptions must contact support.
98
98
  */
99
99
  put: operations["setBillingDefaultPaymentMethod"];
100
100
  post?: never;
@@ -104,6 +104,64 @@ export interface paths {
104
104
  patch?: never;
105
105
  trace?: never;
106
106
  };
107
+ "/api/billing/profile": {
108
+ parameters: {
109
+ query?: never;
110
+ header?: never;
111
+ path?: never;
112
+ cookie?: never;
113
+ };
114
+ /** Get invoice billing details */
115
+ get: operations["getBillingProfile"];
116
+ put?: never;
117
+ post?: never;
118
+ delete?: never;
119
+ options?: never;
120
+ head?: never;
121
+ /** Update invoice billing details */
122
+ patch: operations["updateBillingProfile"];
123
+ trace?: never;
124
+ };
125
+ "/api/billing/invoices": {
126
+ parameters: {
127
+ query?: never;
128
+ header?: never;
129
+ path?: never;
130
+ cookie?: never;
131
+ };
132
+ /**
133
+ * List account invoices
134
+ * @description Returns invoice summaries for the selected account's billing profile. Accounts that share billing have the same invoice history. The default page size is 24; use limit to request between 1 and 100 invoices. When nextCursor is returned, pass its value as cursor to fetch the next page.
135
+ */
136
+ get: operations["listBillingInvoices"];
137
+ put?: never;
138
+ post?: never;
139
+ delete?: never;
140
+ options?: never;
141
+ head?: never;
142
+ patch?: never;
143
+ trace?: never;
144
+ };
145
+ "/api/billing/invoices/{invoiceID}": {
146
+ parameters: {
147
+ query?: never;
148
+ header?: never;
149
+ path?: never;
150
+ cookie?: never;
151
+ };
152
+ /**
153
+ * Get invoice details and a PDF download link
154
+ * @description Returns invoice details and an optional invoicePdf download link. Line items and credit notes are paginated independently; limit applies to each section and defaults to 24, with values from 1 to 100 accepted. A true partialData value means at least one section has more items. To continue a section, pass its lineNextCursor as lineCursor or its creditNoteNextCursor as creditNoteCursor. Retrieve a new PDF link when needed rather than storing it for later use.
155
+ */
156
+ get: operations["getBillingInvoice"];
157
+ put?: never;
158
+ post?: never;
159
+ delete?: never;
160
+ options?: never;
161
+ head?: never;
162
+ patch?: never;
163
+ trace?: never;
164
+ };
107
165
  "/api/activity": {
108
166
  parameters: {
109
167
  query?: never;
@@ -859,7 +917,7 @@ export interface components {
859
917
  code?: string;
860
918
  };
861
919
  BillingOwner: {
862
- /** @description Selected account ID; linked accounts may share a Stripe customer. */
920
+ /** @description Selected account ID. */
863
921
  accountId: string;
864
922
  /** @enum {string} */
865
923
  type: "personal" | "organization";
@@ -912,7 +970,7 @@ export interface components {
912
970
  billingMode: "not_setup" | "self_serve" | "managed";
913
971
  /** @enum {string} */
914
972
  plan: "developer" | "team" | "enterprise" | "unknown";
915
- /** @description Stripe subscription status, `none`, or `managed`. */
973
+ /** @description Current subscription status, `none`, or `managed`. */
916
974
  subscriptionStatus: string;
917
975
  billingPeriod?: components["schemas"]["BillingPeriod"];
918
976
  /**
@@ -998,6 +1056,109 @@ export interface components {
998
1056
  scope: "customer" | "customer_and_subscription";
999
1057
  };
1000
1058
  };
1059
+ BillingProfile: {
1060
+ /** @enum {string} */
1061
+ billingMode: "not_setup" | "self_serve";
1062
+ name: string;
1063
+ email: string;
1064
+ phone: string;
1065
+ address?: components["schemas"]["BillingAddress"];
1066
+ };
1067
+ BillingProfileValidationError: components["schemas"]["ErrorResponse"] & {
1068
+ /** @enum {string} */
1069
+ code: "invalid_billing_profile";
1070
+ data: {
1071
+ /** @description Validation messages keyed by profile field name. */
1072
+ fieldErrors: {
1073
+ [key: string]: string;
1074
+ };
1075
+ };
1076
+ };
1077
+ ApiResponse_BillingProfile: {
1078
+ success: boolean;
1079
+ data: components["schemas"]["BillingProfile"];
1080
+ };
1081
+ BillingInvoiceSummary: {
1082
+ id: string;
1083
+ number: string;
1084
+ /** Format: int64 */
1085
+ date: number;
1086
+ status: string;
1087
+ currency: string;
1088
+ /** Format: int64 */
1089
+ totalCents: number;
1090
+ /** Format: int64 */
1091
+ amountDueCents: number;
1092
+ /** Format: int64 */
1093
+ amountPaidCents: number;
1094
+ /** Format: int64 */
1095
+ amountRemainingCents: number;
1096
+ };
1097
+ ApiResponse_BillingInvoices: {
1098
+ success: boolean;
1099
+ data: components["schemas"]["BillingInvoiceSummary"][];
1100
+ nextCursor?: string;
1101
+ };
1102
+ BillingInvoiceTax: {
1103
+ /** Format: int64 */
1104
+ amountCents: number;
1105
+ /** Format: int64 */
1106
+ taxableAmountCents: number;
1107
+ type: string;
1108
+ };
1109
+ BillingInvoiceCredit: {
1110
+ /** Format: int64 */
1111
+ amountCents: number;
1112
+ type: string;
1113
+ };
1114
+ BillingInvoiceLine: {
1115
+ id: string;
1116
+ description: string;
1117
+ /** Format: int64 */
1118
+ amountCents: number;
1119
+ currency: string;
1120
+ /** Format: int64 */
1121
+ quantity: number;
1122
+ period?: components["schemas"]["BillingPeriod"];
1123
+ taxes: components["schemas"]["BillingInvoiceTax"][];
1124
+ pretaxCredits: components["schemas"]["BillingInvoiceCredit"][];
1125
+ };
1126
+ BillingCreditNote: {
1127
+ id: string;
1128
+ number: string;
1129
+ /** Format: int64 */
1130
+ date: number;
1131
+ status: string;
1132
+ type: string;
1133
+ currency: string;
1134
+ /** Format: int64 */
1135
+ totalCents: number;
1136
+ /** Format: int64 */
1137
+ prePaymentAmountCents: number;
1138
+ /** Format: int64 */
1139
+ postPaymentAmountCents: number;
1140
+ };
1141
+ BillingInvoiceDetail: components["schemas"]["BillingInvoiceSummary"] & {
1142
+ /** Format: int64 */
1143
+ subtotalCents: number;
1144
+ /** Format: int64 */
1145
+ prePaymentCreditNotesAmountCents: number;
1146
+ /** Format: int64 */
1147
+ postPaymentCreditNotesAmountCents: number;
1148
+ taxes: components["schemas"]["BillingInvoiceTax"][];
1149
+ pretaxCredits: components["schemas"]["BillingInvoiceCredit"][];
1150
+ lines: components["schemas"]["BillingInvoiceLine"][];
1151
+ creditNotes: components["schemas"]["BillingCreditNote"][];
1152
+ lineNextCursor?: string;
1153
+ creditNoteNextCursor?: string;
1154
+ partialData: boolean;
1155
+ /** Format: uri */
1156
+ invoicePdf?: string;
1157
+ };
1158
+ ApiResponse_BillingInvoiceDetail: {
1159
+ success: boolean;
1160
+ data: components["schemas"]["BillingInvoiceDetail"];
1161
+ };
1001
1162
  ActivityEvent: {
1002
1163
  accountId: string;
1003
1164
  /**
@@ -2358,7 +2519,7 @@ export interface operations {
2358
2519
  };
2359
2520
  };
2360
2521
  responses: {
2361
- /** @description Updated safe method details */
2522
+ /** @description Updated payment method details */
2362
2523
  200: {
2363
2524
  headers: {
2364
2525
  [name: string]: unknown;
@@ -2391,7 +2552,7 @@ export interface operations {
2391
2552
  };
2392
2553
  requestBody?: never;
2393
2554
  responses: {
2394
- /** @description SetupIntent for client-side confirmation */
2555
+ /** @description Card setup ID and client secret for confirmation */
2395
2556
  200: {
2396
2557
  headers: {
2397
2558
  [name: string]: unknown;
@@ -2445,7 +2606,7 @@ export interface operations {
2445
2606
  };
2446
2607
  };
2447
2608
  responses: {
2448
- /** @description Stripe defaults were fetched again and verified */
2609
+ /** @description Default payment method updated */
2449
2610
  200: {
2450
2611
  headers: {
2451
2612
  [name: string]: unknown;
@@ -2469,6 +2630,144 @@ export interface operations {
2469
2630
  502: components["responses"]["InternalError"];
2470
2631
  };
2471
2632
  };
2633
+ getBillingProfile: {
2634
+ parameters: {
2635
+ query?: never;
2636
+ header?: never;
2637
+ path?: never;
2638
+ cookie?: never;
2639
+ };
2640
+ requestBody?: never;
2641
+ responses: {
2642
+ /** @description Billing profile, or empty fields when billing is not set up */
2643
+ 200: {
2644
+ headers: {
2645
+ [name: string]: unknown;
2646
+ };
2647
+ content: {
2648
+ "application/json": components["schemas"]["ApiResponse_BillingProfile"];
2649
+ };
2650
+ };
2651
+ 403: components["responses"]["Unauthorized"];
2652
+ 502: components["responses"]["InternalError"];
2653
+ };
2654
+ };
2655
+ updateBillingProfile: {
2656
+ parameters: {
2657
+ query?: never;
2658
+ header?: never;
2659
+ path?: never;
2660
+ cookie?: never;
2661
+ };
2662
+ requestBody: {
2663
+ content: {
2664
+ "application/json": {
2665
+ name?: string;
2666
+ /** Format: email */
2667
+ email?: string;
2668
+ phone?: string;
2669
+ address?: components["schemas"]["BillingAddressPatch"];
2670
+ };
2671
+ };
2672
+ };
2673
+ responses: {
2674
+ /** @description Saved invoice billing profile */
2675
+ 200: {
2676
+ headers: {
2677
+ [name: string]: unknown;
2678
+ };
2679
+ content: {
2680
+ "application/json": components["schemas"]["ApiResponse_BillingProfile"];
2681
+ };
2682
+ };
2683
+ /** @description Invalid profile, with fieldErrors in data */
2684
+ 400: {
2685
+ headers: {
2686
+ [name: string]: unknown;
2687
+ };
2688
+ content: {
2689
+ "application/json": components["schemas"]["BillingProfileValidationError"];
2690
+ };
2691
+ };
2692
+ 403: components["responses"]["Unauthorized"];
2693
+ 502: components["responses"]["InternalError"];
2694
+ };
2695
+ };
2696
+ listBillingInvoices: {
2697
+ parameters: {
2698
+ query?: {
2699
+ limit?: number;
2700
+ /** @description Pagination cursor from a previous response */
2701
+ cursor?: components["parameters"]["Cursor"];
2702
+ };
2703
+ header?: never;
2704
+ path?: never;
2705
+ cookie?: never;
2706
+ };
2707
+ requestBody?: never;
2708
+ responses: {
2709
+ /** @description Invoice summaries and an optional next-page cursor */
2710
+ 200: {
2711
+ headers: {
2712
+ [name: string]: unknown;
2713
+ };
2714
+ content: {
2715
+ "application/json": components["schemas"]["ApiResponse_BillingInvoices"];
2716
+ };
2717
+ };
2718
+ 400: components["responses"]["ValidationError"];
2719
+ 401: components["responses"]["Unauthorized"];
2720
+ /** @description Billing is managed by Archil (`managed_billing`) */
2721
+ 409: {
2722
+ headers: {
2723
+ [name: string]: unknown;
2724
+ };
2725
+ content: {
2726
+ "application/json": components["schemas"]["ErrorResponse"];
2727
+ };
2728
+ };
2729
+ 502: components["responses"]["InternalError"];
2730
+ };
2731
+ };
2732
+ getBillingInvoice: {
2733
+ parameters: {
2734
+ query?: {
2735
+ limit?: number;
2736
+ lineCursor?: string;
2737
+ creditNoteCursor?: string;
2738
+ };
2739
+ header?: never;
2740
+ path: {
2741
+ invoiceID: string;
2742
+ };
2743
+ cookie?: never;
2744
+ };
2745
+ requestBody?: never;
2746
+ responses: {
2747
+ /** @description Invoice details with paginated line items and credit notes */
2748
+ 200: {
2749
+ headers: {
2750
+ [name: string]: unknown;
2751
+ };
2752
+ content: {
2753
+ "application/json": components["schemas"]["ApiResponse_BillingInvoiceDetail"];
2754
+ };
2755
+ };
2756
+ 400: components["responses"]["ValidationError"];
2757
+ 401: components["responses"]["Unauthorized"];
2758
+ 404: components["responses"]["NotFound"];
2759
+ /** @description Billing is managed by Archil (`managed_billing`) */
2760
+ 409: {
2761
+ headers: {
2762
+ [name: string]: unknown;
2763
+ };
2764
+ content: {
2765
+ "application/json": components["schemas"]["ErrorResponse"];
2766
+ };
2767
+ };
2768
+ 502: components["responses"]["InternalError"];
2769
+ };
2770
+ };
2472
2771
  listActivity: {
2473
2772
  parameters: {
2474
2773
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",