@archildata/api-types 0.0.44 → 0.0.46

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 +230 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -24,6 +24,60 @@ export interface paths {
24
24
  patch?: never;
25
25
  trace?: never;
26
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
+ };
61
+ "/api/billing/default-payment-method": {
62
+ parameters: {
63
+ query?: never;
64
+ header?: never;
65
+ path?: never;
66
+ cookie?: never;
67
+ };
68
+ get?: never;
69
+ /**
70
+ * Set the default method for customer invoices and the current subscription
71
+ * @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.
72
+ */
73
+ put: operations["setBillingDefaultPaymentMethod"];
74
+ post?: never;
75
+ delete?: never;
76
+ options?: never;
77
+ head?: never;
78
+ patch?: never;
79
+ trace?: never;
80
+ };
27
81
  "/api/activity": {
28
82
  parameters: {
29
83
  query?: never;
@@ -801,6 +855,43 @@ export interface components {
801
855
  success: boolean;
802
856
  data: components["schemas"]["BillingSummary"];
803
857
  };
858
+ BillingPaymentMethod: {
859
+ id: string;
860
+ type: string;
861
+ card?: {
862
+ brand: string;
863
+ last4: string;
864
+ /** Format: int64 */
865
+ expMonth: number;
866
+ /** Format: int64 */
867
+ expYear: number;
868
+ };
869
+ isCustomerDefault: boolean;
870
+ isSubscriptionDefault: boolean;
871
+ isDefault: boolean;
872
+ };
873
+ ApiResponse_BillingPaymentMethods: {
874
+ success: boolean;
875
+ data: components["schemas"]["BillingPaymentMethod"][];
876
+ nextCursor?: string;
877
+ };
878
+ ApiResponse_BillingSetupIntent: {
879
+ success: boolean;
880
+ data: {
881
+ id: string;
882
+ clientSecret: string;
883
+ };
884
+ };
885
+ ApiResponse_BillingDefaultPaymentMethod: {
886
+ success: boolean;
887
+ data: {
888
+ paymentMethodId: string;
889
+ customerDefault: boolean;
890
+ subscriptionDefault: boolean;
891
+ /** @enum {string} */
892
+ scope: "customer" | "customer_and_subscription";
893
+ };
894
+ };
804
895
  ActivityEvent: {
805
896
  accountId: string;
806
897
  /**
@@ -2017,6 +2108,145 @@ export interface operations {
2017
2108
  };
2018
2109
  };
2019
2110
  };
2111
+ listBillingPaymentMethods: {
2112
+ parameters: {
2113
+ query?: {
2114
+ limit?: number;
2115
+ /** @description Pagination cursor from a previous response */
2116
+ cursor?: components["parameters"]["Cursor"];
2117
+ };
2118
+ header?: never;
2119
+ path?: never;
2120
+ cookie?: never;
2121
+ };
2122
+ requestBody?: never;
2123
+ responses: {
2124
+ /** @description Saved methods, with a cursor when more remain */
2125
+ 200: {
2126
+ headers: {
2127
+ [name: string]: unknown;
2128
+ };
2129
+ content: {
2130
+ "application/json": components["schemas"]["ApiResponse_BillingPaymentMethods"];
2131
+ };
2132
+ };
2133
+ 400: components["responses"]["ValidationError"];
2134
+ /** @description Missing, invalid, or disallowed credential */
2135
+ 401: {
2136
+ headers: {
2137
+ [name: string]: unknown;
2138
+ };
2139
+ content: {
2140
+ "text/plain": string;
2141
+ };
2142
+ };
2143
+ /** @description Billing is managed by Archil (`managed_billing`) */
2144
+ 409: {
2145
+ headers: {
2146
+ [name: string]: unknown;
2147
+ };
2148
+ content: {
2149
+ "application/json": components["schemas"]["ErrorResponse"];
2150
+ };
2151
+ };
2152
+ /** @description Payment methods could not be loaded */
2153
+ 502: {
2154
+ headers: {
2155
+ [name: string]: unknown;
2156
+ };
2157
+ content: {
2158
+ "application/json": components["schemas"]["ErrorResponse"];
2159
+ };
2160
+ };
2161
+ };
2162
+ };
2163
+ createBillingSetupIntent: {
2164
+ parameters: {
2165
+ query?: never;
2166
+ header?: never;
2167
+ path?: never;
2168
+ cookie?: never;
2169
+ };
2170
+ requestBody?: never;
2171
+ responses: {
2172
+ /** @description SetupIntent for client-side confirmation */
2173
+ 200: {
2174
+ headers: {
2175
+ [name: string]: unknown;
2176
+ };
2177
+ content: {
2178
+ "application/json": components["schemas"]["ApiResponse_BillingSetupIntent"];
2179
+ };
2180
+ };
2181
+ /** @description Missing, invalid, or disallowed credential */
2182
+ 401: {
2183
+ headers: {
2184
+ [name: string]: unknown;
2185
+ };
2186
+ content: {
2187
+ "text/plain": string;
2188
+ };
2189
+ };
2190
+ /** @description Billing is managed by Archil (`managed_billing`) */
2191
+ 409: {
2192
+ headers: {
2193
+ [name: string]: unknown;
2194
+ };
2195
+ content: {
2196
+ "application/json": components["schemas"]["ErrorResponse"];
2197
+ };
2198
+ };
2199
+ /** @description Card setup could not be started */
2200
+ 502: {
2201
+ headers: {
2202
+ [name: string]: unknown;
2203
+ };
2204
+ content: {
2205
+ "application/json": components["schemas"]["ErrorResponse"];
2206
+ };
2207
+ };
2208
+ };
2209
+ };
2210
+ setBillingDefaultPaymentMethod: {
2211
+ parameters: {
2212
+ query?: never;
2213
+ header?: never;
2214
+ path?: never;
2215
+ cookie?: never;
2216
+ };
2217
+ requestBody: {
2218
+ content: {
2219
+ "application/json": {
2220
+ methodId?: string;
2221
+ setupIntentId?: string;
2222
+ };
2223
+ };
2224
+ };
2225
+ responses: {
2226
+ /** @description Stripe defaults were fetched again and verified */
2227
+ 200: {
2228
+ headers: {
2229
+ [name: string]: unknown;
2230
+ };
2231
+ content: {
2232
+ "application/json": components["schemas"]["ApiResponse_BillingDefaultPaymentMethod"];
2233
+ };
2234
+ };
2235
+ 400: components["responses"]["ValidationError"];
2236
+ /** @description Missing, invalid, or disallowed credential */
2237
+ 401: {
2238
+ headers: {
2239
+ [name: string]: unknown;
2240
+ };
2241
+ content: {
2242
+ "text/plain": string;
2243
+ };
2244
+ };
2245
+ 404: components["responses"]["NotFound"];
2246
+ 409: components["responses"]["ValidationError"];
2247
+ 502: components["responses"]["InternalError"];
2248
+ };
2249
+ };
2020
2250
  listActivity: {
2021
2251
  parameters: {
2022
2252
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",