@openrails/billing-ui 0.233.2 → 0.235.0

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 (41) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +18 -14
  3. package/dist/account/account-billing.d.ts +6 -3
  4. package/dist/account/change-card-dialog.d.ts +5 -2
  5. package/dist/account/payment-methods-panel.d.ts +6 -3
  6. package/dist/client/client.d.ts +33 -17
  7. package/dist/client/errors.d.ts +1 -4
  8. package/dist/client/generated/error-codes.d.ts +1 -1
  9. package/dist/client/generated/routes.d.ts +150 -147
  10. package/dist/client/generated/wire.d.ts +204 -49
  11. package/dist/client/index.d.ts +2 -2
  12. package/dist/client/types.d.ts +131 -42
  13. package/dist/{client-DXUPzA8C.js → client-BpzCZes3.js} +93 -51
  14. package/dist/client-BpzCZes3.js.map +1 -0
  15. package/dist/client.js +1 -1
  16. package/dist/{config-BQELtBh4.js → config-qLcHvK0Q.js} +13 -13
  17. package/dist/config-qLcHvK0Q.js.map +1 -0
  18. package/dist/i18n/context.d.ts +1 -1
  19. package/dist/i18n/messages.d.ts +1 -1
  20. package/dist/index.js +184 -177
  21. package/dist/index.js.map +1 -1
  22. package/dist/locales/de.js +5 -4
  23. package/dist/locales/de.js.map +1 -1
  24. package/dist/locales/en.d.ts +5 -4
  25. package/dist/locales/en.js +5 -4
  26. package/dist/locales/en.js.map +1 -1
  27. package/dist/locales/es.js +5 -4
  28. package/dist/locales/es.js.map +1 -1
  29. package/dist/locales/ja.js +5 -4
  30. package/dist/locales/ja.js.map +1 -1
  31. package/dist/locales/ko.js +5 -4
  32. package/dist/locales/ko.js.map +1 -1
  33. package/dist/locales/zh.js +5 -4
  34. package/dist/locales/zh.js.map +1 -1
  35. package/dist/react/context.d.ts +6 -5
  36. package/dist/react/hooks.d.ts +10 -10
  37. package/dist/react.js +1 -1
  38. package/dist/styles.css +1 -1
  39. package/package.json +2 -2
  40. package/dist/client-DXUPzA8C.js.map +0 -1
  41. package/dist/config-BQELtBh4.js.map +0 -1
@@ -3,11 +3,9 @@ export type OpenRailsRoute = {
3
3
  path: string;
4
4
  group: string;
5
5
  auth: string;
6
- guards: readonly string[];
7
6
  permission: string | null;
8
7
  sensitive: boolean;
9
8
  mountedWhen: string | null;
10
- scope: "self_service" | "billing_management" | "subscription_management" | null;
11
9
  request: string | null;
12
10
  responses: Readonly<Record<number, string | null>>;
13
11
  errors: readonly string[];
@@ -18,11 +16,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
18
16
  readonly path: "/health/live";
19
17
  readonly group: "meta";
20
18
  readonly auth: "public";
21
- readonly guards: readonly [];
22
19
  readonly permission: null;
23
20
  readonly sensitive: false;
24
21
  readonly mountedWhen: null;
25
- readonly scope: null;
26
22
  readonly request: null;
27
23
  readonly responses: {
28
24
  readonly 200: "Health";
@@ -34,43 +30,23 @@ export declare const OPENRAILS_ROUTES: readonly [{
34
30
  readonly path: "/health/ready";
35
31
  readonly group: "meta";
36
32
  readonly auth: "public";
37
- readonly guards: readonly [];
38
33
  readonly permission: null;
39
34
  readonly sensitive: false;
40
35
  readonly mountedWhen: null;
41
- readonly scope: null;
42
36
  readonly request: null;
43
37
  readonly responses: {
44
38
  readonly 200: "Health";
45
39
  };
46
40
  readonly errors: readonly ["service_unavailable"];
47
41
  readonly errorSets: readonly ["tier:public"];
48
- }, {
49
- readonly method: "GET";
50
- readonly path: "/metrics";
51
- readonly group: "meta";
52
- readonly auth: "public";
53
- readonly guards: readonly [];
54
- readonly permission: null;
55
- readonly sensitive: false;
56
- readonly mountedWhen: null;
57
- readonly scope: null;
58
- readonly request: null;
59
- readonly responses: {
60
- readonly 200: "text/plain";
61
- };
62
- readonly errors: readonly [];
63
- readonly errorSets: readonly ["tier:public"];
64
42
  }, {
65
43
  readonly method: "GET";
66
44
  readonly path: "/v1/config";
67
45
  readonly group: "meta";
68
46
  readonly auth: "public";
69
- readonly guards: readonly [];
70
47
  readonly permission: null;
71
48
  readonly sensitive: false;
72
49
  readonly mountedWhen: null;
73
- readonly scope: null;
74
50
  readonly request: null;
75
51
  readonly responses: {
76
52
  readonly 200: "PublicConfig";
@@ -82,11 +58,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
82
58
  readonly path: "/v1/solana/tokens";
83
59
  readonly group: "checkout";
84
60
  readonly auth: "public";
85
- readonly guards: readonly [];
86
61
  readonly permission: null;
87
62
  readonly sensitive: false;
88
63
  readonly mountedWhen: "solana";
89
- readonly scope: null;
90
64
  readonly request: null;
91
65
  readonly responses: {
92
66
  readonly 200: "SupportedTokensResponse";
@@ -98,43 +72,37 @@ export declare const OPENRAILS_ROUTES: readonly [{
98
72
  readonly path: "/v1/checkout-sessions/{id}";
99
73
  readonly group: "checkout";
100
74
  readonly auth: "checkout_session";
101
- readonly guards: readonly [];
102
75
  readonly permission: null;
103
76
  readonly sensitive: false;
104
77
  readonly mountedWhen: null;
105
- readonly scope: null;
106
78
  readonly request: null;
107
79
  readonly responses: {
108
80
  readonly 200: "CheckoutSession";
109
81
  };
110
- readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_blocked", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
82
+ readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
111
83
  readonly errorSets: readonly ["tier:checkout_session"];
112
84
  }, {
113
85
  readonly method: "POST";
114
86
  readonly path: "/v1/checkout-sessions/{id}/pay";
115
87
  readonly group: "checkout";
116
88
  readonly auth: "checkout_session";
117
- readonly guards: readonly [];
118
89
  readonly permission: null;
119
90
  readonly sensitive: false;
120
91
  readonly mountedWhen: null;
121
- readonly scope: null;
122
92
  readonly request: "PayCheckoutSessionParams";
123
93
  readonly responses: {
124
94
  readonly 200: "CheckoutSessionPayResult";
125
95
  };
126
- readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_blocked", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
96
+ readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
127
97
  readonly errorSets: readonly ["tier:checkout_session", "request"];
128
98
  }, {
129
99
  readonly method: "GET";
130
100
  readonly path: "/v1/checkout-attempts/{id}/solana-pay";
131
101
  readonly group: "checkout";
132
102
  readonly auth: "session_id";
133
- readonly guards: readonly [];
134
103
  readonly permission: null;
135
104
  readonly sensitive: false;
136
105
  readonly mountedWhen: "solana";
137
- readonly scope: null;
138
106
  readonly request: null;
139
107
  readonly responses: {
140
108
  readonly 200: "SolanaPayGetResponse";
@@ -146,11 +114,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
146
114
  readonly path: "/v1/checkout-attempts/{id}/solana-pay";
147
115
  readonly group: "checkout";
148
116
  readonly auth: "session_id";
149
- readonly guards: readonly [];
150
117
  readonly permission: null;
151
118
  readonly sensitive: false;
152
119
  readonly mountedWhen: "solana";
153
- readonly scope: null;
154
120
  readonly request: "SolanaPayPostRequest";
155
121
  readonly responses: {
156
122
  readonly 200: "SolanaPayPostResponse";
@@ -162,59 +128,51 @@ export declare const OPENRAILS_ROUTES: readonly [{
162
128
  readonly path: "/v1/me/checkout-sessions";
163
129
  readonly group: "customer";
164
130
  readonly auth: "customer";
165
- readonly guards: readonly [];
166
131
  readonly permission: null;
167
132
  readonly sensitive: false;
168
133
  readonly mountedWhen: null;
169
- readonly scope: "self_service";
170
134
  readonly request: "MintCheckoutSessionParams";
171
135
  readonly responses: {
172
136
  readonly 201: "CheckoutSessionLink";
173
137
  };
174
- readonly errors: readonly ["authentication_required", "checkout_offer_unavailable", "checkout_session_unavailable", "customer_action_required", "customer_blocked", "invalid_param", "resource_conflict", "resource_not_found", "service_unavailable"];
138
+ readonly errors: readonly ["authentication_required", "checkout_offer_unavailable", "checkout_session_unavailable", "customer_action_required", "invalid_param", "resource_conflict", "resource_not_found", "service_unavailable"];
175
139
  readonly errorSets: readonly ["tier:customer", "request"];
176
140
  }, {
177
141
  readonly method: "GET";
178
142
  readonly path: "/v1/me/checkout-sessions/{id}";
179
143
  readonly group: "customer";
180
144
  readonly auth: "customer";
181
- readonly guards: readonly [];
182
145
  readonly permission: null;
183
146
  readonly sensitive: false;
184
147
  readonly mountedWhen: null;
185
- readonly scope: "billing_management";
186
148
  readonly request: null;
187
149
  readonly responses: {
188
150
  readonly 200: "CheckoutSession";
189
151
  };
190
- readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_blocked", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
152
+ readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
191
153
  readonly errorSets: readonly ["tier:customer"];
192
154
  }, {
193
155
  readonly method: "POST";
194
156
  readonly path: "/v1/me/checkout-sessions/{id}/pay";
195
157
  readonly group: "customer";
196
158
  readonly auth: "customer";
197
- readonly guards: readonly [];
198
159
  readonly permission: null;
199
160
  readonly sensitive: false;
200
161
  readonly mountedWhen: null;
201
- readonly scope: "billing_management";
202
162
  readonly request: "PayCheckoutSessionParams";
203
163
  readonly responses: {
204
164
  readonly 200: "CheckoutSessionPayResult";
205
165
  };
206
- readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_action_required", "customer_blocked", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
166
+ readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "credential_custody_transition_required", "customer_action_required", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
207
167
  readonly errorSets: readonly ["tier:customer", "request"];
208
168
  }, {
209
169
  readonly method: "GET";
210
170
  readonly path: "/v1/captcha/status";
211
171
  readonly group: "checkout";
212
172
  readonly auth: "public";
213
- readonly guards: readonly [];
214
173
  readonly permission: null;
215
174
  readonly sensitive: false;
216
175
  readonly mountedWhen: null;
217
- readonly scope: null;
218
176
  readonly request: null;
219
177
  readonly responses: {
220
178
  readonly 200: "CaptchaStatus";
@@ -226,27 +184,122 @@ export declare const OPENRAILS_ROUTES: readonly [{
226
184
  readonly path: "/v1/captcha/client.js";
227
185
  readonly group: "checkout";
228
186
  readonly auth: "public";
229
- readonly guards: readonly [];
230
187
  readonly permission: null;
231
188
  readonly sensitive: false;
232
189
  readonly mountedWhen: null;
233
- readonly scope: null;
234
190
  readonly request: null;
235
191
  readonly responses: {
236
192
  readonly 200: "application/javascript";
237
193
  };
238
194
  readonly errors: readonly [];
239
195
  readonly errorSets: readonly ["tier:public"];
196
+ }, {
197
+ readonly method: "POST";
198
+ readonly path: "/v1/me/orders/preview";
199
+ readonly group: "customer";
200
+ readonly auth: "customer";
201
+ readonly permission: null;
202
+ readonly sensitive: false;
203
+ readonly mountedWhen: null;
204
+ readonly request: "PreviewOrderParams";
205
+ readonly responses: {
206
+ readonly 200: "OrderPreview";
207
+ };
208
+ readonly errors: readonly ["already_owned", "invalid_param", "order_line_unavailable", "quantity_not_allowed", "resource_not_found", "service_unavailable"];
209
+ readonly errorSets: readonly ["tier:customer", "request"];
210
+ }, {
211
+ readonly method: "POST";
212
+ readonly path: "/v1/me/orders";
213
+ readonly group: "customer";
214
+ readonly auth: "customer";
215
+ readonly permission: null;
216
+ readonly sensitive: false;
217
+ readonly mountedWhen: null;
218
+ readonly request: "CreateOrderParams";
219
+ readonly responses: {
220
+ readonly 200: "Order";
221
+ readonly 201: "Order";
222
+ };
223
+ readonly errors: readonly ["already_owned", "card_attempts_blocked", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_line_unavailable", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_method_stale", "payment_option_unavailable", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable"];
224
+ readonly errorSets: readonly ["tier:customer", "request"];
225
+ }, {
226
+ readonly method: "GET";
227
+ readonly path: "/v1/me/orders";
228
+ readonly group: "customer";
229
+ readonly auth: "customer";
230
+ readonly permission: null;
231
+ readonly sensitive: false;
232
+ readonly mountedWhen: null;
233
+ readonly request: null;
234
+ readonly responses: {
235
+ readonly 200: "ListPage<Order>";
236
+ };
237
+ readonly errors: readonly ["invalid_cursor", "service_unavailable"];
238
+ readonly errorSets: readonly ["tier:customer", "request"];
239
+ }, {
240
+ readonly method: "GET";
241
+ readonly path: "/v1/me/orders/{id}";
242
+ readonly group: "customer";
243
+ readonly auth: "customer";
244
+ readonly permission: null;
245
+ readonly sensitive: false;
246
+ readonly mountedWhen: null;
247
+ readonly request: null;
248
+ readonly responses: {
249
+ readonly 200: "Order";
250
+ };
251
+ readonly errors: readonly ["resource_not_found", "service_unavailable"];
252
+ readonly errorSets: readonly ["tier:customer"];
253
+ }, {
254
+ readonly method: "POST";
255
+ readonly path: "/v1/me/orders/{id}/pay";
256
+ readonly group: "customer";
257
+ readonly auth: "customer";
258
+ readonly permission: null;
259
+ readonly sensitive: false;
260
+ readonly mountedWhen: null;
261
+ readonly request: "PayOrderParams";
262
+ readonly responses: {
263
+ readonly 200: "Order";
264
+ };
265
+ readonly errors: readonly ["card_attempts_blocked", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_method_stale", "payment_option_unavailable", "resource_conflict", "resource_not_found", "service_unavailable"];
266
+ readonly errorSets: readonly ["tier:customer", "request"];
267
+ }, {
268
+ readonly method: "POST";
269
+ readonly path: "/v1/me/orders/{id}/confirm";
270
+ readonly group: "customer";
271
+ readonly auth: "customer";
272
+ readonly permission: null;
273
+ readonly sensitive: false;
274
+ readonly mountedWhen: null;
275
+ readonly request: null;
276
+ readonly responses: {
277
+ readonly 200: "Order";
278
+ };
279
+ readonly errors: readonly ["customer_action_required", "customer_session_required", "resource_conflict", "resource_not_found", "service_unavailable"];
280
+ readonly errorSets: readonly ["tier:customer"];
281
+ }, {
282
+ readonly method: "POST";
283
+ readonly path: "/v1/me/orders/{id}/cancel";
284
+ readonly group: "customer";
285
+ readonly auth: "customer";
286
+ readonly permission: null;
287
+ readonly sensitive: false;
288
+ readonly mountedWhen: null;
289
+ readonly request: null;
290
+ readonly responses: {
291
+ readonly 200: "Order";
292
+ };
293
+ readonly errors: readonly ["order_not_cancelable", "resource_not_found", "service_unavailable"];
294
+ readonly errorSets: readonly ["tier:customer"];
240
295
  }, {
241
296
  readonly method: "GET";
242
297
  readonly path: "/v1/catalog/products";
243
298
  readonly group: "checkout";
244
299
  readonly auth: "public";
245
- readonly guards: readonly [];
246
300
  readonly permission: null;
247
301
  readonly sensitive: false;
248
302
  readonly mountedWhen: null;
249
- readonly scope: null;
250
303
  readonly request: null;
251
304
  readonly responses: {
252
305
  readonly 200: "ListPage<Product>";
@@ -258,11 +311,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
258
311
  readonly path: "/v1/me/subscriptions/{id}/cancel";
259
312
  readonly group: "customer";
260
313
  readonly auth: "customer";
261
- readonly guards: readonly [];
262
314
  readonly permission: null;
263
315
  readonly sensitive: false;
264
316
  readonly mountedWhen: null;
265
- readonly scope: "subscription_management";
266
317
  readonly request: "CustomerCancelSubscriptionParams";
267
318
  readonly responses: {
268
319
  readonly 200: "Subscription";
@@ -274,11 +325,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
274
325
  readonly path: "/v1/me/subscriptions/{id}/resume";
275
326
  readonly group: "customer";
276
327
  readonly auth: "customer";
277
- readonly guards: readonly [];
278
328
  readonly permission: null;
279
329
  readonly sensitive: false;
280
330
  readonly mountedWhen: null;
281
- readonly scope: "subscription_management";
282
331
  readonly request: null;
283
332
  readonly responses: {
284
333
  readonly 200: "Subscription";
@@ -290,27 +339,23 @@ export declare const OPENRAILS_ROUTES: readonly [{
290
339
  readonly path: "/v1/me/subscriptions/{id}/payment-method";
291
340
  readonly group: "customer";
292
341
  readonly auth: "customer";
293
- readonly guards: readonly [];
294
342
  readonly permission: null;
295
343
  readonly sensitive: false;
296
344
  readonly mountedWhen: null;
297
- readonly scope: "subscription_management";
298
345
  readonly request: "SetSubscriptionPaymentMethodParams";
299
346
  readonly responses: {
300
347
  readonly 200: "Subscription";
301
348
  };
302
- readonly errors: readonly ["authentication_required", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
349
+ readonly errors: readonly ["authentication_required", "card_declined", "default_payment_method_required", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "payment_method_stale", "payment_provider_rejected", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
303
350
  readonly errorSets: readonly ["tier:customer", "request"];
304
351
  }, {
305
352
  readonly method: "GET";
306
353
  readonly path: "/v1/me/subscriptions";
307
354
  readonly group: "customer";
308
355
  readonly auth: "customer";
309
- readonly guards: readonly [];
310
356
  readonly permission: null;
311
357
  readonly sensitive: false;
312
358
  readonly mountedWhen: null;
313
- readonly scope: "billing_management";
314
359
  readonly request: null;
315
360
  readonly responses: {
316
361
  readonly 200: "ListPage<Subscription>";
@@ -322,11 +367,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
322
367
  readonly path: "/v1/me/subscriptions/{id}";
323
368
  readonly group: "customer";
324
369
  readonly auth: "customer";
325
- readonly guards: readonly [];
326
370
  readonly permission: null;
327
371
  readonly sensitive: false;
328
372
  readonly mountedWhen: null;
329
- readonly scope: "billing_management";
330
373
  readonly request: null;
331
374
  readonly responses: {
332
375
  readonly 200: "Subscription";
@@ -338,11 +381,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
338
381
  readonly path: "/v1/me/subscriptions/{id}/retry-now";
339
382
  readonly group: "customer";
340
383
  readonly auth: "customer";
341
- readonly guards: readonly [];
342
384
  readonly permission: null;
343
385
  readonly sensitive: false;
344
386
  readonly mountedWhen: null;
345
- readonly scope: "billing_management";
346
387
  readonly request: "RetrySubscriptionNowParams";
347
388
  readonly responses: {
348
389
  readonly 200: "SubscriptionRetryNowResult";
@@ -352,47 +393,41 @@ export declare const OPENRAILS_ROUTES: readonly [{
352
393
  readonly errorSets: readonly ["tier:customer", "request"];
353
394
  }, {
354
395
  readonly method: "POST";
355
- readonly path: "/v1/me/subscriptions/{id}/change-tier";
396
+ readonly path: "/v1/me/subscriptions/{id}/change";
356
397
  readonly group: "customer";
357
398
  readonly auth: "customer";
358
- readonly guards: readonly [];
359
399
  readonly permission: null;
360
400
  readonly sensitive: false;
361
401
  readonly mountedWhen: null;
362
- readonly scope: "self_service";
363
- readonly request: "CustomerChangeTierParams";
402
+ readonly request: "CustomerChangeSubscriptionParams";
364
403
  readonly responses: {
365
- readonly 200: "TierChange";
366
- readonly 202: "TierChange";
404
+ readonly 200: "SubscriptionChange";
405
+ readonly 202: "SubscriptionChange";
367
406
  };
368
- readonly errors: readonly ["authentication_required", "card_declined", "customer_action_required", "customer_email_required", "invalid_param", "payment_duplicate_refused", "payment_method_stale", "payment_provider_rejected", "price_not_found", "product_not_found", "rebill_terms_committed", "reprice_already_scheduled", "reprice_cross_currency", "resource_conflict", "resource_not_found", "service_unavailable", "solana_rpc_unavailable", "solana_transaction_refused", "subscription_not_active", "subscription_not_found", "tier_change_in_flight", "tier_change_period_unknown", "tier_change_provider_conflict", "tier_change_refused", "tier_change_requires_linked_plan", "tier_change_target_inactive", "tier_change_unsupported_on_rail"];
407
+ readonly errors: readonly ["authentication_required", "card_declined", "customer_action_required", "customer_email_required", "invalid_param", "payment_duplicate_refused", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "quantity_not_allowed", "rebill_terms_committed", "resource_conflict", "resource_not_found", "scheduled_change_exists", "service_unavailable", "solana_rpc_unavailable", "solana_transaction_refused", "subscription_change_already_scheduled", "subscription_change_credit_exceeds_price", "subscription_change_cycle_unknown", "subscription_change_idempotency_conflict", "subscription_change_idempotency_key_required", "subscription_change_in_flight", "subscription_change_period_unknown", "subscription_change_provider_conflict", "subscription_change_refused", "subscription_change_renewal_due", "subscription_change_requires_linked_plan", "subscription_change_target_inactive", "subscription_change_unsupported_on_rail", "subscription_not_active", "subscription_not_found"];
369
408
  readonly errorSets: readonly ["tier:customer", "request"];
370
409
  }, {
371
410
  readonly method: "POST";
372
- readonly path: "/v1/me/subscriptions/{id}/change-tier/preview";
411
+ readonly path: "/v1/me/subscriptions/{id}/change/preview";
373
412
  readonly group: "customer";
374
413
  readonly auth: "customer";
375
- readonly guards: readonly [];
376
414
  readonly permission: null;
377
415
  readonly sensitive: false;
378
416
  readonly mountedWhen: null;
379
- readonly scope: "self_service";
380
- readonly request: "ChangeTierParams";
417
+ readonly request: "PreviewSubscriptionChangeParams";
381
418
  readonly responses: {
382
- readonly 200: "TierChangePreview";
419
+ readonly 200: "SubscriptionChangePreview";
383
420
  };
384
- readonly errors: readonly ["authentication_required", "card_declined", "customer_email_required", "invalid_param", "payment_method_stale", "payment_provider_rejected", "price_not_found", "product_not_found", "reprice_cross_currency", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_not_active", "subscription_not_found", "tier_change_in_flight", "tier_change_period_unknown", "tier_change_provider_conflict", "tier_change_requires_linked_plan", "tier_change_target_inactive", "tier_change_unsupported_on_rail"];
421
+ readonly errors: readonly ["authentication_required", "card_declined", "customer_email_required", "invalid_param", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_change_already_scheduled", "subscription_change_credit_exceeds_price", "subscription_change_cycle_unknown", "subscription_change_in_flight", "subscription_change_period_unknown", "subscription_change_provider_conflict", "subscription_change_renewal_due", "subscription_change_requires_linked_plan", "subscription_change_target_inactive", "subscription_change_unsupported_on_rail", "subscription_not_active", "subscription_not_found"];
385
422
  readonly errorSets: readonly ["tier:customer", "request"];
386
423
  }, {
387
424
  readonly method: "GET";
388
425
  readonly path: "/v1/me/entitlements";
389
426
  readonly group: "customer";
390
427
  readonly auth: "customer";
391
- readonly guards: readonly [];
392
428
  readonly permission: null;
393
429
  readonly sensitive: false;
394
430
  readonly mountedWhen: null;
395
- readonly scope: "billing_management";
396
431
  readonly request: null;
397
432
  readonly responses: {
398
433
  readonly 200: "ListPage<CustomerEntitlement>";
@@ -404,11 +439,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
404
439
  readonly path: "/v1/me/product-access";
405
440
  readonly group: "customer";
406
441
  readonly auth: "customer";
407
- readonly guards: readonly [];
408
442
  readonly permission: null;
409
443
  readonly sensitive: false;
410
444
  readonly mountedWhen: null;
411
- readonly scope: "billing_management";
412
445
  readonly request: null;
413
446
  readonly responses: {
414
447
  readonly 200: "ListPage<ProductAccessGrant>";
@@ -420,11 +453,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
420
453
  readonly path: "/v1/me/spend-limits";
421
454
  readonly group: "customer";
422
455
  readonly auth: "customer";
423
- readonly guards: readonly [];
424
456
  readonly permission: null;
425
457
  readonly sensitive: false;
426
458
  readonly mountedWhen: null;
427
- readonly scope: "billing_management";
428
459
  readonly request: null;
429
460
  readonly responses: {
430
461
  readonly 200: "SpendLimits";
@@ -433,30 +464,26 @@ export declare const OPENRAILS_ROUTES: readonly [{
433
464
  readonly errorSets: readonly ["tier:customer", "request"];
434
465
  }, {
435
466
  readonly method: "GET";
436
- readonly path: "/v1/me/balance";
467
+ readonly path: "/v1/me";
437
468
  readonly group: "customer";
438
469
  readonly auth: "customer";
439
- readonly guards: readonly [];
440
470
  readonly permission: null;
441
471
  readonly sensitive: false;
442
472
  readonly mountedWhen: null;
443
- readonly scope: "billing_management";
444
473
  readonly request: null;
445
474
  readonly responses: {
446
- readonly 200: "Balance";
475
+ readonly 200: "CustomerAccount";
447
476
  };
448
- readonly errors: readonly ["currency_unsupported"];
449
- readonly errorSets: readonly ["tier:customer", "request"];
477
+ readonly errors: readonly [];
478
+ readonly errorSets: readonly ["tier:customer"];
450
479
  }, {
451
480
  readonly method: "GET";
452
481
  readonly path: "/v1/me/balance/transactions";
453
482
  readonly group: "customer";
454
483
  readonly auth: "customer";
455
- readonly guards: readonly [];
456
484
  readonly permission: null;
457
485
  readonly sensitive: false;
458
486
  readonly mountedWhen: null;
459
- readonly scope: "billing_management";
460
487
  readonly request: null;
461
488
  readonly responses: {
462
489
  readonly 200: "ListPage<BalanceTransaction>";
@@ -468,11 +495,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
468
495
  readonly path: "/v1/me/usage";
469
496
  readonly group: "customer";
470
497
  readonly auth: "customer";
471
- readonly guards: readonly [];
472
498
  readonly permission: null;
473
499
  readonly sensitive: false;
474
500
  readonly mountedWhen: null;
475
- readonly scope: "billing_management";
476
501
  readonly request: null;
477
502
  readonly responses: {
478
503
  readonly 200: "Usage";
@@ -484,11 +509,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
484
509
  readonly path: "/v1/me/invoices";
485
510
  readonly group: "customer";
486
511
  readonly auth: "customer";
487
- readonly guards: readonly [];
488
512
  readonly permission: null;
489
513
  readonly sensitive: false;
490
514
  readonly mountedWhen: null;
491
- readonly scope: "billing_management";
492
515
  readonly request: null;
493
516
  readonly responses: {
494
517
  readonly 200: "ListPage<Invoice>";
@@ -500,11 +523,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
500
523
  readonly path: "/v1/me/invoices/{id}";
501
524
  readonly group: "customer";
502
525
  readonly auth: "customer";
503
- readonly guards: readonly [];
504
526
  readonly permission: null;
505
527
  readonly sensitive: false;
506
528
  readonly mountedWhen: null;
507
- readonly scope: "billing_management";
508
529
  readonly request: null;
509
530
  readonly responses: {
510
531
  readonly 200: "Invoice";
@@ -516,11 +537,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
516
537
  readonly path: "/v1/me/invoices/{id}/pay-now";
517
538
  readonly group: "customer";
518
539
  readonly auth: "customer";
519
- readonly guards: readonly [];
520
540
  readonly permission: null;
521
541
  readonly sensitive: false;
522
542
  readonly mountedWhen: null;
523
- readonly scope: "billing_management";
524
543
  readonly request: "PayInvoiceParams";
525
544
  readonly responses: {
526
545
  readonly 200: "InvoicePayNow";
@@ -533,11 +552,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
533
552
  readonly path: "/v1/me/payment-operations/{id}/authentication";
534
553
  readonly group: "customer";
535
554
  readonly auth: "customer";
536
- readonly guards: readonly [];
537
555
  readonly permission: null;
538
556
  readonly sensitive: false;
539
557
  readonly mountedWhen: null;
540
- readonly scope: "billing_management";
541
558
  readonly request: null;
542
559
  readonly responses: {
543
560
  readonly 200: "StripeEngineAuthentication";
@@ -549,11 +566,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
549
566
  readonly path: "/v1/me/payment-operations/{id}/authentication/confirm";
550
567
  readonly group: "customer";
551
568
  readonly auth: "customer";
552
- readonly guards: readonly [];
553
569
  readonly permission: null;
554
570
  readonly sensitive: false;
555
571
  readonly mountedWhen: null;
556
- readonly scope: "billing_management";
557
572
  readonly request: null;
558
573
  readonly responses: {
559
574
  readonly 200: "PaymentOperation";
@@ -565,11 +580,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
565
580
  readonly path: "/v1/me/payments";
566
581
  readonly group: "customer";
567
582
  readonly auth: "customer";
568
- readonly guards: readonly [];
569
583
  readonly permission: null;
570
584
  readonly sensitive: false;
571
585
  readonly mountedWhen: null;
572
- readonly scope: "billing_management";
573
586
  readonly request: null;
574
587
  readonly responses: {
575
588
  readonly 200: "ListPage<Payment>";
@@ -578,30 +591,26 @@ export declare const OPENRAILS_ROUTES: readonly [{
578
591
  readonly errorSets: readonly ["tier:customer", "request"];
579
592
  }, {
580
593
  readonly method: "PUT";
581
- readonly path: "/v1/me/collection-payment-method";
594
+ readonly path: "/v1/me/default-payment-methods/{currency}";
582
595
  readonly group: "customer";
583
596
  readonly auth: "customer";
584
- readonly guards: readonly [];
585
597
  readonly permission: null;
586
598
  readonly sensitive: false;
587
599
  readonly mountedWhen: null;
588
- readonly scope: "subscription_management";
589
- readonly request: "CollectionPaymentMethod";
600
+ readonly request: "SetDefaultPaymentMethodParams";
590
601
  readonly responses: {
591
- readonly 200: "CollectionPaymentMethod";
602
+ readonly 200: "DefaultPaymentMethod";
592
603
  };
593
- readonly errors: readonly ["collection_payment_method_invalid", "invalid_param"];
604
+ readonly errors: readonly ["authentication_required", "card_declined", "default_payment_method_invalid", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "payment_method_stale", "payment_provider_rejected", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
594
605
  readonly errorSets: readonly ["tier:customer", "request"];
595
606
  }, {
596
607
  readonly method: "GET";
597
608
  readonly path: "/v1/me/payment-methods";
598
609
  readonly group: "customer";
599
610
  readonly auth: "customer";
600
- readonly guards: readonly [];
601
611
  readonly permission: null;
602
612
  readonly sensitive: false;
603
613
  readonly mountedWhen: null;
604
- readonly scope: "billing_management";
605
614
  readonly request: null;
606
615
  readonly responses: {
607
616
  readonly 200: "ListPage<PaymentMethod>";
@@ -613,11 +622,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
613
622
  readonly path: "/v1/me/payment-methods";
614
623
  readonly group: "customer";
615
624
  readonly auth: "customer";
616
- readonly guards: readonly [];
617
625
  readonly permission: null;
618
626
  readonly sensitive: false;
619
627
  readonly mountedWhen: null;
620
- readonly scope: "billing_management";
621
628
  readonly request: "CreatePaymentMethodParams";
622
629
  readonly responses: {
623
630
  readonly 201: "PaymentMethod";
@@ -629,11 +636,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
629
636
  readonly path: "/v1/me/payment-methods/{id}";
630
637
  readonly group: "customer";
631
638
  readonly auth: "customer";
632
- readonly guards: readonly [];
633
639
  readonly permission: null;
634
640
  readonly sensitive: false;
635
641
  readonly mountedWhen: null;
636
- readonly scope: "billing_management";
637
642
  readonly request: "ReplacePaymentMethodCardParams";
638
643
  readonly responses: {
639
644
  readonly 200: "PaymentMethod";
@@ -641,16 +646,42 @@ export declare const OPENRAILS_ROUTES: readonly [{
641
646
  };
642
647
  readonly errors: readonly ["card_declined", "card_not_saved", "card_requires_https", "credential_custody_transition_required", "invalid_param", "payment_method_update_failed", "payment_method_update_retry_required", "payment_method_update_unsupported", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
643
648
  readonly errorSets: readonly ["tier:customer", "request"];
649
+ }, {
650
+ readonly method: "PATCH";
651
+ readonly path: "/v1/me/payment-methods/{id}";
652
+ readonly group: "customer";
653
+ readonly auth: "customer";
654
+ readonly permission: null;
655
+ readonly sensitive: false;
656
+ readonly mountedWhen: null;
657
+ readonly request: "UpdatePaymentMethodParams";
658
+ readonly responses: {
659
+ readonly 200: "PaymentMethod";
660
+ };
661
+ readonly errors: readonly ["card_requires_https", "invalid_param", "payment_method_not_usable", "payment_method_update_unsupported", "payment_provider_rejected", "provider_outcome_unknown", "resource_not_found", "service_unavailable"];
662
+ readonly errorSets: readonly ["tier:customer", "request"];
663
+ }, {
664
+ readonly method: "POST";
665
+ readonly path: "/v1/me/payment-methods/{id}/verify";
666
+ readonly group: "customer";
667
+ readonly auth: "customer";
668
+ readonly permission: null;
669
+ readonly sensitive: false;
670
+ readonly mountedWhen: null;
671
+ readonly request: null;
672
+ readonly responses: {
673
+ readonly 200: "PaymentMethod";
674
+ };
675
+ readonly errors: readonly ["card_attempts_blocked", "card_declined", "insufficient_funds", "invalid_param", "payment_method_not_usable", "payment_method_update_unsupported", "payment_provider_rejected", "provider_outcome_unknown", "resource_not_found", "service_unavailable"];
676
+ readonly errorSets: readonly ["tier:customer"];
644
677
  }, {
645
678
  readonly method: "DELETE";
646
679
  readonly path: "/v1/me/payment-methods/{id}";
647
680
  readonly group: "customer";
648
681
  readonly auth: "customer";
649
- readonly guards: readonly [];
650
682
  readonly permission: null;
651
683
  readonly sensitive: false;
652
684
  readonly mountedWhen: null;
653
- readonly scope: "billing_management";
654
685
  readonly request: null;
655
686
  readonly responses: {
656
687
  readonly 202: null;
@@ -663,11 +694,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
663
694
  readonly path: "/v1/me/payment-method-setups";
664
695
  readonly group: "customer";
665
696
  readonly auth: "customer";
666
- readonly guards: readonly [];
667
697
  readonly permission: null;
668
698
  readonly sensitive: false;
669
699
  readonly mountedWhen: null;
670
- readonly scope: "billing_management";
671
700
  readonly request: "PaymentMethodSetupParams";
672
701
  readonly responses: {
673
702
  readonly 200: "PaymentMethodSetup";
@@ -679,11 +708,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
679
708
  readonly path: "/v1/me/payment-method-setups/{id}";
680
709
  readonly group: "customer";
681
710
  readonly auth: "customer";
682
- readonly guards: readonly [];
683
711
  readonly permission: null;
684
712
  readonly sensitive: false;
685
713
  readonly mountedWhen: null;
686
- readonly scope: "billing_management";
687
714
  readonly request: null;
688
715
  readonly responses: {
689
716
  readonly 200: "PaymentMethodSetup";
@@ -695,11 +722,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
695
722
  readonly path: "/v1/me/payment-method-setups/{id}/confirm";
696
723
  readonly group: "customer";
697
724
  readonly auth: "customer";
698
- readonly guards: readonly [];
699
725
  readonly permission: null;
700
726
  readonly sensitive: false;
701
727
  readonly mountedWhen: null;
702
- readonly scope: "billing_management";
703
728
  readonly request: null;
704
729
  readonly responses: {
705
730
  readonly 200: "PaymentMethodSetup";
@@ -711,11 +736,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
711
736
  readonly path: "/v1/me/billing-portal";
712
737
  readonly group: "customer";
713
738
  readonly auth: "customer";
714
- readonly guards: readonly [];
715
739
  readonly permission: null;
716
740
  readonly sensitive: false;
717
741
  readonly mountedWhen: "stripe_portal";
718
- readonly scope: "self_service";
719
742
  readonly request: null;
720
743
  readonly responses: {
721
744
  readonly 200: "PortalResponse";
@@ -727,43 +750,23 @@ export declare const OPENRAILS_ROUTES: readonly [{
727
750
  readonly path: "/v1/me/notifications";
728
751
  readonly group: "customer";
729
752
  readonly auth: "customer";
730
- readonly guards: readonly [];
731
753
  readonly permission: null;
732
754
  readonly sensitive: false;
733
755
  readonly mountedWhen: null;
734
- readonly scope: "billing_management";
735
756
  readonly request: null;
736
757
  readonly responses: {
737
758
  readonly 200: "ListPage<Notification>";
738
759
  };
739
760
  readonly errors: readonly ["invalid_cursor"];
740
761
  readonly errorSets: readonly ["tier:customer", "request"];
741
- }, {
742
- readonly method: "GET";
743
- readonly path: "/v1/me/notifications/unread-count";
744
- readonly group: "customer";
745
- readonly auth: "customer";
746
- readonly guards: readonly [];
747
- readonly permission: null;
748
- readonly sensitive: false;
749
- readonly mountedWhen: null;
750
- readonly scope: "billing_management";
751
- readonly request: null;
752
- readonly responses: {
753
- readonly 200: "UnreadCount";
754
- };
755
- readonly errors: readonly [];
756
- readonly errorSets: readonly ["tier:customer"];
757
762
  }, {
758
763
  readonly method: "POST";
759
764
  readonly path: "/v1/me/notifications/read";
760
765
  readonly group: "customer";
761
766
  readonly auth: "customer";
762
- readonly guards: readonly [];
763
767
  readonly permission: null;
764
768
  readonly sensitive: false;
765
769
  readonly mountedWhen: null;
766
- readonly scope: "billing_management";
767
770
  readonly request: "MarkNotificationsReadParams";
768
771
  readonly responses: {
769
772
  readonly 200: "CustomerNotificationLookup";