@archildata/api-types 0.0.43 → 0.0.45
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.
- package/index.d.ts +290 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4,6 +4,60 @@
|
|
|
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
|
+
};
|
|
27
|
+
"/api/billing/payment-methods": {
|
|
28
|
+
parameters: {
|
|
29
|
+
query?: never;
|
|
30
|
+
header?: never;
|
|
31
|
+
path?: never;
|
|
32
|
+
cookie?: never;
|
|
33
|
+
};
|
|
34
|
+
/** List saved billing payment methods */
|
|
35
|
+
get: operations["listBillingPaymentMethods"];
|
|
36
|
+
put?: never;
|
|
37
|
+
post?: never;
|
|
38
|
+
delete?: never;
|
|
39
|
+
options?: never;
|
|
40
|
+
head?: never;
|
|
41
|
+
patch?: never;
|
|
42
|
+
trace?: never;
|
|
43
|
+
};
|
|
44
|
+
"/api/billing/setup-intents": {
|
|
45
|
+
parameters: {
|
|
46
|
+
query?: never;
|
|
47
|
+
header?: never;
|
|
48
|
+
path?: never;
|
|
49
|
+
cookie?: never;
|
|
50
|
+
};
|
|
51
|
+
get?: never;
|
|
52
|
+
put?: never;
|
|
53
|
+
/** Start card setup with Stripe Elements */
|
|
54
|
+
post: operations["createBillingSetupIntent"];
|
|
55
|
+
delete?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
60
|
+
};
|
|
7
61
|
"/api/activity": {
|
|
8
62
|
parameters: {
|
|
9
63
|
query?: never;
|
|
@@ -709,6 +763,105 @@ export interface components {
|
|
|
709
763
|
/** @description Stable machine-readable error code. */
|
|
710
764
|
code?: string;
|
|
711
765
|
};
|
|
766
|
+
BillingOwner: {
|
|
767
|
+
/** @description Selected account ID; linked accounts may share a Stripe customer. */
|
|
768
|
+
accountId: string;
|
|
769
|
+
/** @enum {string} */
|
|
770
|
+
type: "personal" | "organization";
|
|
771
|
+
};
|
|
772
|
+
BillingPeriod: {
|
|
773
|
+
/**
|
|
774
|
+
* Format: int64
|
|
775
|
+
* @description Unix timestamp in seconds.
|
|
776
|
+
*/
|
|
777
|
+
start: number;
|
|
778
|
+
/**
|
|
779
|
+
* Format: int64
|
|
780
|
+
* @description Unix timestamp in seconds.
|
|
781
|
+
*/
|
|
782
|
+
end: number;
|
|
783
|
+
};
|
|
784
|
+
BillingScheduledChange: {
|
|
785
|
+
/** @enum {string} */
|
|
786
|
+
type: "schedule_transition" | "plan_change";
|
|
787
|
+
/**
|
|
788
|
+
* Format: int64
|
|
789
|
+
* @description Unix timestamp in seconds.
|
|
790
|
+
*/
|
|
791
|
+
effectiveAt: number;
|
|
792
|
+
/** @enum {string} */
|
|
793
|
+
targetPlan?: "developer" | "team" | "enterprise";
|
|
794
|
+
};
|
|
795
|
+
BillingPaymentHealth: {
|
|
796
|
+
/** @enum {string} */
|
|
797
|
+
status: "not_applicable" | "invoice_open" | "action_required" | "missing_payment_method" | "healthy";
|
|
798
|
+
hasDefaultPaymentMethod: boolean;
|
|
799
|
+
openInvoiceId?: string;
|
|
800
|
+
/** Format: int64 */
|
|
801
|
+
amountRemainingCents?: number;
|
|
802
|
+
openInvoiceCurrency?: string;
|
|
803
|
+
};
|
|
804
|
+
BillingSummaryActions: {
|
|
805
|
+
canStartCheckout: boolean;
|
|
806
|
+
canManagePaymentMethods: boolean;
|
|
807
|
+
canUpdateBillingProfile: boolean;
|
|
808
|
+
canViewInvoices: boolean;
|
|
809
|
+
canChangePlan: boolean;
|
|
810
|
+
canCancel: boolean;
|
|
811
|
+
canKeepSubscription: boolean;
|
|
812
|
+
canPayOpenInvoice: boolean;
|
|
813
|
+
};
|
|
814
|
+
BillingSummary: {
|
|
815
|
+
billingOwner: components["schemas"]["BillingOwner"];
|
|
816
|
+
/** @enum {string} */
|
|
817
|
+
billingMode: "not_setup" | "self_serve" | "managed";
|
|
818
|
+
/** @enum {string} */
|
|
819
|
+
plan: "developer" | "team" | "enterprise" | "unknown";
|
|
820
|
+
/** @description Stripe subscription status, `none`, or `managed`. */
|
|
821
|
+
subscriptionStatus: string;
|
|
822
|
+
billingPeriod?: components["schemas"]["BillingPeriod"];
|
|
823
|
+
/**
|
|
824
|
+
* Format: int64
|
|
825
|
+
* @description Unix timestamp in seconds.
|
|
826
|
+
*/
|
|
827
|
+
scheduledCancellationAt?: number;
|
|
828
|
+
scheduledChange?: components["schemas"]["BillingScheduledChange"];
|
|
829
|
+
hasPendingUpdate: boolean;
|
|
830
|
+
paymentHealth: components["schemas"]["BillingPaymentHealth"];
|
|
831
|
+
actions: components["schemas"]["BillingSummaryActions"];
|
|
832
|
+
};
|
|
833
|
+
ApiResponse_BillingSummary: {
|
|
834
|
+
/** @example true */
|
|
835
|
+
success: boolean;
|
|
836
|
+
data: components["schemas"]["BillingSummary"];
|
|
837
|
+
};
|
|
838
|
+
BillingPaymentMethod: {
|
|
839
|
+
id: string;
|
|
840
|
+
type: string;
|
|
841
|
+
card?: {
|
|
842
|
+
brand: string;
|
|
843
|
+
last4: string;
|
|
844
|
+
/** Format: int64 */
|
|
845
|
+
expMonth: number;
|
|
846
|
+
/** Format: int64 */
|
|
847
|
+
expYear: number;
|
|
848
|
+
};
|
|
849
|
+
isCustomerDefault: boolean;
|
|
850
|
+
isSubscriptionDefault: boolean;
|
|
851
|
+
isDefault: boolean;
|
|
852
|
+
};
|
|
853
|
+
ApiResponse_BillingPaymentMethods: {
|
|
854
|
+
success: boolean;
|
|
855
|
+
data: components["schemas"]["BillingPaymentMethod"][];
|
|
856
|
+
nextCursor?: string;
|
|
857
|
+
};
|
|
858
|
+
ApiResponse_BillingSetupIntent: {
|
|
859
|
+
success: boolean;
|
|
860
|
+
data: {
|
|
861
|
+
id: string;
|
|
862
|
+
clientSecret: string;
|
|
863
|
+
};
|
|
864
|
+
};
|
|
712
865
|
ActivityEvent: {
|
|
713
866
|
accountId: string;
|
|
714
867
|
/**
|
|
@@ -1887,6 +2040,143 @@ export interface components {
|
|
|
1887
2040
|
}
|
|
1888
2041
|
export type $defs = Record<string, never>;
|
|
1889
2042
|
export interface operations {
|
|
2043
|
+
getBillingSummary: {
|
|
2044
|
+
parameters: {
|
|
2045
|
+
query?: never;
|
|
2046
|
+
header?: never;
|
|
2047
|
+
path?: never;
|
|
2048
|
+
cookie?: never;
|
|
2049
|
+
};
|
|
2050
|
+
requestBody?: never;
|
|
2051
|
+
responses: {
|
|
2052
|
+
/** @description Billing summary */
|
|
2053
|
+
200: {
|
|
2054
|
+
headers: {
|
|
2055
|
+
[name: string]: unknown;
|
|
2056
|
+
};
|
|
2057
|
+
content: {
|
|
2058
|
+
"application/json": components["schemas"]["ApiResponse_BillingSummary"];
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
/** @description Missing, invalid, or disallowed credential */
|
|
2062
|
+
401: {
|
|
2063
|
+
headers: {
|
|
2064
|
+
[name: string]: unknown;
|
|
2065
|
+
};
|
|
2066
|
+
content: {
|
|
2067
|
+
"text/plain": string;
|
|
2068
|
+
};
|
|
2069
|
+
};
|
|
2070
|
+
/** @description Billing data could not be loaded */
|
|
2071
|
+
502: {
|
|
2072
|
+
headers: {
|
|
2073
|
+
[name: string]: unknown;
|
|
2074
|
+
};
|
|
2075
|
+
content: {
|
|
2076
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2077
|
+
};
|
|
2078
|
+
};
|
|
2079
|
+
};
|
|
2080
|
+
};
|
|
2081
|
+
listBillingPaymentMethods: {
|
|
2082
|
+
parameters: {
|
|
2083
|
+
query?: {
|
|
2084
|
+
limit?: number;
|
|
2085
|
+
/** @description Pagination cursor from a previous response */
|
|
2086
|
+
cursor?: components["parameters"]["Cursor"];
|
|
2087
|
+
};
|
|
2088
|
+
header?: never;
|
|
2089
|
+
path?: never;
|
|
2090
|
+
cookie?: never;
|
|
2091
|
+
};
|
|
2092
|
+
requestBody?: never;
|
|
2093
|
+
responses: {
|
|
2094
|
+
/** @description Saved methods, with a cursor when more remain */
|
|
2095
|
+
200: {
|
|
2096
|
+
headers: {
|
|
2097
|
+
[name: string]: unknown;
|
|
2098
|
+
};
|
|
2099
|
+
content: {
|
|
2100
|
+
"application/json": components["schemas"]["ApiResponse_BillingPaymentMethods"];
|
|
2101
|
+
};
|
|
2102
|
+
};
|
|
2103
|
+
400: components["responses"]["ValidationError"];
|
|
2104
|
+
/** @description Missing, invalid, or disallowed credential */
|
|
2105
|
+
401: {
|
|
2106
|
+
headers: {
|
|
2107
|
+
[name: string]: unknown;
|
|
2108
|
+
};
|
|
2109
|
+
content: {
|
|
2110
|
+
"text/plain": string;
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
/** @description Billing is managed by Archil (`managed_billing`) */
|
|
2114
|
+
409: {
|
|
2115
|
+
headers: {
|
|
2116
|
+
[name: string]: unknown;
|
|
2117
|
+
};
|
|
2118
|
+
content: {
|
|
2119
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2120
|
+
};
|
|
2121
|
+
};
|
|
2122
|
+
/** @description Payment methods could not be loaded */
|
|
2123
|
+
502: {
|
|
2124
|
+
headers: {
|
|
2125
|
+
[name: string]: unknown;
|
|
2126
|
+
};
|
|
2127
|
+
content: {
|
|
2128
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
};
|
|
2132
|
+
};
|
|
2133
|
+
createBillingSetupIntent: {
|
|
2134
|
+
parameters: {
|
|
2135
|
+
query?: never;
|
|
2136
|
+
header?: never;
|
|
2137
|
+
path?: never;
|
|
2138
|
+
cookie?: never;
|
|
2139
|
+
};
|
|
2140
|
+
requestBody?: never;
|
|
2141
|
+
responses: {
|
|
2142
|
+
/** @description SetupIntent for client-side confirmation */
|
|
2143
|
+
200: {
|
|
2144
|
+
headers: {
|
|
2145
|
+
[name: string]: unknown;
|
|
2146
|
+
};
|
|
2147
|
+
content: {
|
|
2148
|
+
"application/json": components["schemas"]["ApiResponse_BillingSetupIntent"];
|
|
2149
|
+
};
|
|
2150
|
+
};
|
|
2151
|
+
/** @description Missing, invalid, or disallowed credential */
|
|
2152
|
+
401: {
|
|
2153
|
+
headers: {
|
|
2154
|
+
[name: string]: unknown;
|
|
2155
|
+
};
|
|
2156
|
+
content: {
|
|
2157
|
+
"text/plain": string;
|
|
2158
|
+
};
|
|
2159
|
+
};
|
|
2160
|
+
/** @description Billing is managed by Archil (`managed_billing`) */
|
|
2161
|
+
409: {
|
|
2162
|
+
headers: {
|
|
2163
|
+
[name: string]: unknown;
|
|
2164
|
+
};
|
|
2165
|
+
content: {
|
|
2166
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2167
|
+
};
|
|
2168
|
+
};
|
|
2169
|
+
/** @description Card setup could not be started */
|
|
2170
|
+
502: {
|
|
2171
|
+
headers: {
|
|
2172
|
+
[name: string]: unknown;
|
|
2173
|
+
};
|
|
2174
|
+
content: {
|
|
2175
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
2176
|
+
};
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2179
|
+
};
|
|
1890
2180
|
listActivity: {
|
|
1891
2181
|
parameters: {
|
|
1892
2182
|
query?: {
|