@openrails/billing-ui 0.230.0 → 0.233.2

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 (65) hide show
  1. package/CHANGELOG.md +103 -9
  2. package/README.md +88 -39
  3. package/dist/account/account-billing.d.ts +3 -3
  4. package/dist/account/cancel-dialog.d.ts +2 -2
  5. package/dist/account/format.d.ts +4 -4
  6. package/dist/account/payment-methods-panel.d.ts +7 -9
  7. package/dist/account/section.d.ts +3 -1
  8. package/dist/checkout-page.d.ts +6 -1
  9. package/dist/client/client.d.ts +76 -62
  10. package/dist/client/generated/currencies.d.ts +1 -0
  11. package/dist/client/generated/error-codes.d.ts +7 -0
  12. package/dist/client/generated/routes.d.ts +775 -0
  13. package/dist/client/generated/wire.d.ts +682 -0
  14. package/dist/client/index.d.ts +3 -3
  15. package/dist/client/types.d.ts +425 -379
  16. package/dist/client-DXUPzA8C.js +889 -0
  17. package/dist/client-DXUPzA8C.js.map +1 -0
  18. package/dist/client.js +2 -3
  19. package/dist/components/methods.d.ts +3 -3
  20. package/dist/config-BQELtBh4.js +341 -0
  21. package/dist/config-BQELtBh4.js.map +1 -0
  22. package/dist/frame.d.ts +1 -1
  23. package/dist/index.d.ts +4 -4
  24. package/dist/index.js +1447 -1539
  25. package/dist/index.js.map +1 -1
  26. package/dist/lib/billing.d.ts +14 -0
  27. package/dist/lib/money.d.ts +1 -0
  28. package/dist/lib/period.d.ts +0 -2
  29. package/dist/lib/rail-meta.d.ts +4 -4
  30. package/dist/locales/de.js +11 -8
  31. package/dist/locales/de.js.map +1 -1
  32. package/dist/locales/en.d.ts +8 -5
  33. package/dist/locales/en.js +11 -8
  34. package/dist/locales/en.js.map +1 -1
  35. package/dist/locales/es.js +11 -8
  36. package/dist/locales/es.js.map +1 -1
  37. package/dist/locales/ja.js +11 -8
  38. package/dist/locales/ja.js.map +1 -1
  39. package/dist/locales/ko.js +11 -8
  40. package/dist/locales/ko.js.map +1 -1
  41. package/dist/locales/zh.js +11 -8
  42. package/dist/locales/zh.js.map +1 -1
  43. package/dist/psp.d.ts +10 -21
  44. package/dist/react/config.d.ts +34 -0
  45. package/dist/react/context.d.ts +5 -8
  46. package/dist/react/hooks.d.ts +20 -14
  47. package/dist/react/index.d.ts +1 -0
  48. package/dist/react/provider.d.ts +1 -9
  49. package/dist/react/remote.d.ts +0 -1
  50. package/dist/react.js +24 -28
  51. package/dist/react.js.map +1 -1
  52. package/dist/save-payment-method.d.ts +1 -1
  53. package/dist/source.d.ts +0 -9
  54. package/dist/styles.css +1 -1
  55. package/dist/types.d.ts +114 -55
  56. package/docs/payment-form-contract.md +23 -40
  57. package/package.json +3 -3
  58. package/dist/client/generated/openrails-routes.d.ts +0 -2
  59. package/dist/client-DhG2jv34.js +0 -771
  60. package/dist/client-DhG2jv34.js.map +0 -1
  61. package/dist/errors-T-PRm3vV.js +0 -54
  62. package/dist/errors-T-PRm3vV.js.map +0 -1
  63. package/dist/hooks-DLFF-zx5.js +0 -285
  64. package/dist/hooks-DLFF-zx5.js.map +0 -1
  65. package/docs/1055-nmi-host-integration.md +0 -28
@@ -6,6 +6,7 @@ export declare const pageSchema: <T extends z.ZodType>(item: T) => z.ZodObject<{
6
6
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7
7
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8
8
  has_more: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
9
+ next_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
10
  }, z.core.$strip>;
10
11
  export interface Page<T> {
11
12
  data: T[];
@@ -13,23 +14,60 @@ export interface Page<T> {
13
14
  limit?: number | null;
14
15
  offset?: number | null;
15
16
  has_more?: boolean | null;
17
+ /** The next page's cursor; null on the last page of a cursor list. */
18
+ next_cursor?: string | null;
19
+ }
20
+ /** One page of a cursor list; `next_cursor` is null on the last page. */
21
+ export declare const listPageSchema: <T extends z.ZodType>(item: T) => z.ZodObject<{
22
+ data: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<T>>>, z.ZodTransform<z.core.output<T>[], z.core.output<T>[] | null | undefined>>;
23
+ next_cursor: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
24
+ }, z.core.$strip>;
25
+ export interface ListPage<T> {
26
+ data: T[];
27
+ next_cursor: string | null;
16
28
  }
17
29
  export declare const subscriptionStatusSchema: z.ZodString;
18
- /** `pending | active | past_due | awaiting_method | unverified | cancelled`; kept open for new values. */
19
- export type SubscriptionStatus = "pending" | "active" | "past_due" | "awaiting_method" | "unverified" | "cancelled" | (string & {});
20
- export declare const subscriptionPriceSchema: z.ZodObject<{
30
+ /** `pending | active | past_due | awaiting_method | unverified | canceled`; kept open for new values. */
31
+ export type SubscriptionStatus = "pending" | "active" | "past_due" | "awaiting_method" | "unverified" | "canceled" | (string & {});
32
+ export declare const pspLinkStateSchema: z.ZodObject<{
33
+ status: z.ZodString;
34
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
35
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ }, z.core.$strip>;
37
+ /**
38
+ * A catalog price, embedded in a product (`GET /catalog/products`): `unit_amount` of
39
+ * `currency` for `access_duration_hours` of access (null: for good),
40
+ * charging every `billing_interval_hours` (null: one-time).
41
+ */
42
+ export declare const priceSchema: z.ZodObject<{
21
43
  id: z.ZodString;
22
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ key: z.ZodString;
45
+ revision: z.ZodOptional<z.ZodNumber>;
46
+ product_id: z.ZodString;
47
+ archived: z.ZodBoolean;
24
48
  unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
49
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
50
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
51
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
52
+ }, z.core.$strip>>>;
25
53
  currency: z.ZodString;
26
- auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
27
- access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
55
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
56
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
57
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
58
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
59
+ status: z.ZodString;
60
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
61
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ }, z.core.$strip>>>>;
63
+ created_at: z.ZodString;
64
+ updated_at: z.ZodString;
28
65
  }, z.core.$strip>;
29
- export type SubscriptionPrice = z.infer<typeof subscriptionPriceSchema>;
66
+ export type Price = z.infer<typeof priceSchema>;
30
67
  export declare const subscriptionProductSchema: z.ZodObject<{
31
68
  id: z.ZodString;
32
69
  key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ revision: z.ZodOptional<z.ZodNumber>;
33
71
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
72
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
73
  tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -58,6 +96,19 @@ export declare const paymentRecoverySchema: z.ZodObject<{
58
96
  }, z.core.$strip>>>;
59
97
  }, z.core.$strip>;
60
98
  export type PaymentRecovery = z.infer<typeof paymentRecoverySchema>;
99
+ /**
100
+ * A step the customer takes before an action completes. With
101
+ * `solana_sign_transactions` the wallet signs and sends `transactions` in
102
+ * order; the action is then repeated with the last signature.
103
+ */
104
+ export declare const nextActionSchema: z.ZodObject<{
105
+ type: z.ZodString;
106
+ redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
107
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, z.core.$strip>>>;
109
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
110
+ }, z.core.$strip>;
111
+ export type NextAction = z.infer<typeof nextActionSchema>;
61
112
  export declare const subscriptionSchema: z.ZodObject<{
62
113
  id: z.ZodString;
63
114
  status: z.ZodString;
@@ -70,26 +121,46 @@ export declare const subscriptionSchema: z.ZodObject<{
70
121
  ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
122
  current_period_starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
123
  current_period_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
- cancelled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
125
  cancel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
126
  resumable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
76
127
  cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
77
128
  cancel_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
129
  cancel_portal_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ access: z.ZodOptional<z.ZodNullable<z.ZodObject<{
131
+ starts_at: z.ZodString;
132
+ ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
+ }, z.core.$strip>>>;
79
134
  grace_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
135
  next_retry_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
136
  price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
82
137
  id: z.ZodString;
83
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ key: z.ZodString;
139
+ revision: z.ZodOptional<z.ZodNumber>;
140
+ product_id: z.ZodString;
141
+ archived: z.ZodBoolean;
85
142
  unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
143
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
144
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
145
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
146
+ }, z.core.$strip>>>;
86
147
  currency: z.ZodString;
87
- auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
88
- access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
148
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
149
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
150
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
151
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
152
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
153
+ status: z.ZodString;
154
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
155
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ }, z.core.$strip>>>>;
157
+ created_at: z.ZodString;
158
+ updated_at: z.ZodString;
89
159
  }, z.core.$strip>>>;
90
160
  product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
91
161
  id: z.ZodString;
92
162
  key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ revision: z.ZodOptional<z.ZodNumber>;
93
164
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
165
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
166
  tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -97,16 +168,32 @@ export declare const subscriptionSchema: z.ZodObject<{
97
168
  }, z.core.$strip>>>;
98
169
  scheduled_price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
99
170
  id: z.ZodString;
100
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ key: z.ZodString;
172
+ revision: z.ZodOptional<z.ZodNumber>;
173
+ product_id: z.ZodString;
174
+ archived: z.ZodBoolean;
102
175
  unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
176
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
177
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
178
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
179
+ }, z.core.$strip>>>;
103
180
  currency: z.ZodString;
104
- auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
105
- access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
181
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
182
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
183
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
184
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
185
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
186
+ status: z.ZodString;
187
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
188
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ }, z.core.$strip>>>>;
190
+ created_at: z.ZodString;
191
+ updated_at: z.ZodString;
106
192
  }, z.core.$strip>>>;
107
193
  scheduled_product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
108
194
  id: z.ZodString;
109
195
  key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ revision: z.ZodOptional<z.ZodNumber>;
110
197
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
198
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
199
  tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -127,15 +214,35 @@ export declare const subscriptionSchema: z.ZodObject<{
127
214
  status: z.ZodString;
128
215
  }, z.core.$strip>>>;
129
216
  }, z.core.$strip>>>;
217
+ next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
218
+ type: z.ZodString;
219
+ redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
220
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ }, z.core.$strip>>>;
222
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
223
+ }, z.core.$strip>>>;
130
224
  created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
225
  updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
226
  }, z.core.$strip>;
133
227
  export type Subscription = z.infer<typeof subscriptionSchema> & {
134
228
  status: SubscriptionStatus;
135
229
  };
230
+ export declare const billingDetailsSchema: z.ZodObject<{
231
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
235
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
+ }, z.core.$strip>>>;
242
+ }, z.core.$strip>;
243
+ export type BillingDetails = z.infer<typeof billingDetailsSchema>;
136
244
  export declare const paymentMethodSchema: z.ZodObject<{
137
245
  id: z.ZodString;
138
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
139
246
  rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
140
247
  psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
248
  card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -147,6 +254,15 @@ export declare const paymentMethodSchema: z.ZodObject<{
147
254
  billing_details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
148
255
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
256
  email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
259
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ }, z.core.$strip>>>;
150
266
  }, z.core.$strip>>>;
151
267
  health: z.ZodOptional<z.ZodNullable<z.ZodObject<{
152
268
  expiry_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -158,34 +274,141 @@ export declare const paymentMethodSchema: z.ZodObject<{
158
274
  id: z.ZodString;
159
275
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
276
  }, z.core.$strip>>>>;
161
- default: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
162
- collection_default_currencies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
277
+ collection_currencies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
163
278
  created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
279
  }, z.core.$strip>;
165
280
  export type PaymentMethod = z.infer<typeof paymentMethodSchema>;
281
+ /** A price's state on one PSP; public routes carry the status only. */
282
+ export declare const productSchema: z.ZodObject<{
283
+ id: z.ZodString;
284
+ key: z.ZodString;
285
+ revision: z.ZodOptional<z.ZodNumber>;
286
+ display_name: z.ZodString;
287
+ description: z.ZodString;
288
+ entitlements: z.ZodArray<z.ZodString>;
289
+ credit_grant: z.ZodOptional<z.ZodNullable<z.ZodObject<{
290
+ currency: z.ZodString;
291
+ amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
292
+ from_payment: z.ZodOptional<z.ZodBoolean>;
293
+ expires_after_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
294
+ }, z.core.$strip>>>;
295
+ tier_group: z.ZodNullable<z.ZodString>;
296
+ tier_rank: z.ZodNumber;
297
+ archived: z.ZodBoolean;
298
+ prices: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
299
+ id: z.ZodString;
300
+ key: z.ZodString;
301
+ revision: z.ZodOptional<z.ZodNumber>;
302
+ product_id: z.ZodString;
303
+ archived: z.ZodBoolean;
304
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
305
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
306
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
307
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
308
+ }, z.core.$strip>>>;
309
+ currency: z.ZodString;
310
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
311
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
312
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
313
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
314
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
315
+ status: z.ZodString;
316
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
317
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ }, z.core.$strip>>>>;
319
+ created_at: z.ZodString;
320
+ updated_at: z.ZodString;
321
+ }, z.core.$strip>>>>, z.ZodTransform<{
322
+ id: string;
323
+ key: string;
324
+ product_id: string;
325
+ archived: boolean;
326
+ unit_amount: string;
327
+ currency: string;
328
+ access_duration_hours: number | null;
329
+ billing_interval_hours: number | null;
330
+ trial_unit_amount: string | null;
331
+ trial_duration_hours: number | null;
332
+ created_at: string;
333
+ updated_at: string;
334
+ revision?: number | undefined;
335
+ customer_amount?: {
336
+ min_amount: string;
337
+ max_amount: string;
338
+ } | null | undefined;
339
+ psps?: Record<string, {
340
+ status: string;
341
+ ids?: Record<string, string> | null | undefined;
342
+ sync_status?: string | null | undefined;
343
+ }> | null | undefined;
344
+ }[], {
345
+ id: string;
346
+ key: string;
347
+ product_id: string;
348
+ archived: boolean;
349
+ unit_amount: string;
350
+ currency: string;
351
+ access_duration_hours: number | null;
352
+ billing_interval_hours: number | null;
353
+ trial_unit_amount: string | null;
354
+ trial_duration_hours: number | null;
355
+ created_at: string;
356
+ updated_at: string;
357
+ revision?: number | undefined;
358
+ customer_amount?: {
359
+ min_amount: string;
360
+ max_amount: string;
361
+ } | null | undefined;
362
+ psps?: Record<string, {
363
+ status: string;
364
+ ids?: Record<string, string> | null | undefined;
365
+ sync_status?: string | null | undefined;
366
+ }> | null | undefined;
367
+ }[] | null | undefined>>;
368
+ created_at: z.ZodString;
369
+ updated_at: z.ZodString;
370
+ }, z.core.$strip>;
371
+ export type Product = z.infer<typeof productSchema>;
166
372
  export declare const paymentSchema: z.ZodObject<{
167
373
  id: z.ZodString;
168
- object: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
- status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
+ kind: z.ZodString;
375
+ status: z.ZodString;
170
376
  amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
171
377
  amount_refunded: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
172
378
  currency: z.ZodString;
173
379
  subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
382
  rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
- refunded: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
176
383
  created_at: z.ZodString;
177
384
  price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
178
- id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
- product: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
- recurring: z.ZodOptional<z.ZodNullable<z.ZodObject<{
183
- interval: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ id: z.ZodString;
386
+ key: z.ZodString;
387
+ revision: z.ZodOptional<z.ZodNumber>;
388
+ product_id: z.ZodString;
389
+ archived: z.ZodBoolean;
390
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
391
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
392
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
393
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
184
394
  }, z.core.$strip>>>;
395
+ currency: z.ZodString;
396
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
397
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
398
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
399
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
400
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
401
+ status: z.ZodString;
402
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
403
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
404
+ }, z.core.$strip>>>>;
405
+ created_at: z.ZodString;
406
+ updated_at: z.ZodString;
185
407
  }, z.core.$strip>>>;
186
408
  product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
187
409
  id: z.ZodString;
188
410
  key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ revision: z.ZodOptional<z.ZodNumber>;
189
412
  display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
413
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
414
  tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -208,8 +431,8 @@ export declare const invoiceSchema: z.ZodObject<{
208
431
  id: z.ZodString;
209
432
  currency: z.ZodString;
210
433
  invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
211
- period_from: z.ZodString;
212
- period_to: z.ZodString;
434
+ period_starts_at: z.ZodString;
435
+ period_ends_at: z.ZodString;
213
436
  total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
214
437
  amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
215
438
  amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
@@ -229,164 +452,6 @@ export declare const invoiceSchema: z.ZodObject<{
229
452
  created_at: z.ZodString;
230
453
  }, z.core.$strip>;
231
454
  export type Invoice = z.infer<typeof invoiceSchema>;
232
- export declare const invoicePageSchema: z.ZodObject<{
233
- invoices: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
234
- id: z.ZodString;
235
- currency: z.ZodString;
236
- invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
- period_from: z.ZodString;
238
- period_to: z.ZodString;
239
- total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
240
- amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
241
- amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
242
- status: z.ZodString;
243
- issued_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
- due_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
- paid_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
246
- recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
247
- last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
- retryable: z.ZodBoolean;
249
- blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
- operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
251
- id: z.ZodString;
252
- status: z.ZodString;
253
- }, z.core.$strip>>>;
254
- }, z.core.$strip>>>;
255
- created_at: z.ZodString;
256
- }, z.core.$strip>>>>, z.ZodTransform<{
257
- id: string;
258
- currency: string;
259
- period_from: string;
260
- period_to: string;
261
- total_amount: string;
262
- amount_paid: string;
263
- amount_due: string;
264
- status: string;
265
- created_at: string;
266
- invoice_number?: string | null | undefined;
267
- issued_at?: string | null | undefined;
268
- due_at?: string | null | undefined;
269
- paid_at?: string | null | undefined;
270
- recovery?: {
271
- retryable: boolean;
272
- last_failure_reason?: string | null | undefined;
273
- blocked_reason?: string | null | undefined;
274
- operation?: {
275
- id: string;
276
- status: string;
277
- } | null | undefined;
278
- } | null | undefined;
279
- }[], {
280
- id: string;
281
- currency: string;
282
- period_from: string;
283
- period_to: string;
284
- total_amount: string;
285
- amount_paid: string;
286
- amount_due: string;
287
- status: string;
288
- created_at: string;
289
- invoice_number?: string | null | undefined;
290
- issued_at?: string | null | undefined;
291
- due_at?: string | null | undefined;
292
- paid_at?: string | null | undefined;
293
- recovery?: {
294
- retryable: boolean;
295
- last_failure_reason?: string | null | undefined;
296
- blocked_reason?: string | null | undefined;
297
- operation?: {
298
- id: string;
299
- status: string;
300
- } | null | undefined;
301
- } | null | undefined;
302
- }[] | null | undefined>>;
303
- total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
304
- limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
305
- offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
306
- }, z.core.$strip>;
307
- export declare const billingStatusSchema: z.ZodObject<{
308
- has_active_subscription: z.ZodBoolean;
309
- subscription: z.ZodOptional<z.ZodNullable<z.ZodObject<{
310
- id: z.ZodString;
311
- status: z.ZodString;
312
- rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
- price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
315
- psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
- payment_method_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
- started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
- ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
319
- current_period_starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
320
- current_period_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
321
- cancelled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
- cancel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
- resumable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
324
- cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
325
- cancel_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
- cancel_portal_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
- grace_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
328
- next_retry_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
- price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
330
- id: z.ZodString;
331
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
333
- unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
334
- currency: z.ZodString;
335
- auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
336
- access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
337
- }, z.core.$strip>>>;
338
- product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
339
- id: z.ZodString;
340
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
341
- display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
343
- tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
344
- tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
345
- }, z.core.$strip>>>;
346
- scheduled_price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
347
- id: z.ZodString;
348
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
- product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
- unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
351
- currency: z.ZodString;
352
- auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
353
- access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
354
- }, z.core.$strip>>>;
355
- scheduled_product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
356
- id: z.ZodString;
357
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
- display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
359
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
- tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
361
- tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
362
- }, z.core.$strip>>>;
363
- card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
364
- brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
365
- last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
366
- exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
367
- exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
368
- }, z.core.$strip>>>;
369
- recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
370
- last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
- retryable: z.ZodBoolean;
372
- blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
- operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
374
- id: z.ZodString;
375
- status: z.ZodString;
376
- }, z.core.$strip>>>;
377
- }, z.core.$strip>>>;
378
- created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
- }, z.core.$strip>>>;
381
- next_renewal_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
- entitlements: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
383
- entitlement: z.ZodString;
384
- start_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
- end_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
- revoked_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
387
- }, z.core.$strip>>>>;
388
- }, z.core.$strip>;
389
- export type BillingStatus = z.infer<typeof billingStatusSchema>;
390
455
  /** Currency code (upper case) to its native-unit scale. */
391
456
  export type CurrencyScales = Readonly<Record<string, number>>;
392
457
  export declare const currencySchema: z.ZodObject<{
@@ -395,87 +460,6 @@ export declare const currencySchema: z.ZodObject<{
395
460
  minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
396
461
  }, z.core.$strip>;
397
462
  export type Currency = z.infer<typeof currencySchema>;
398
- export declare const currencyRegistrySchema: z.ZodObject<{
399
- currencies: z.ZodArray<z.ZodObject<{
400
- code: z.ZodString;
401
- decimals: z.ZodNumber;
402
- minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
403
- }, z.core.$strip>>;
404
- }, z.core.$strip>;
405
- /** A catalog price (`GET /prices`, embedded in `GET /products`). */
406
- export declare const priceSchema: z.ZodObject<{
407
- id: z.ZodString;
408
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
409
- unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
410
- currency: z.ZodString;
411
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
- recurring: z.ZodOptional<z.ZodNullable<z.ZodObject<{
413
- interval: z.ZodString;
414
- }, z.core.$strip>>>;
415
- product: z.ZodOptional<z.ZodNullable<z.ZodString>>;
416
- active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
417
- providers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
418
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
419
- created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
- }, z.core.$strip>;
421
- export type Price = z.infer<typeof priceSchema>;
422
- export declare const productSchema: z.ZodObject<{
423
- id: z.ZodString;
424
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
425
- name: z.ZodString;
426
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
- entitlements_spec: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>>;
428
- tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
- tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
430
- active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
431
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
432
- created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
433
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
- prices: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
435
- id: z.ZodString;
436
- key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
- unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
438
- currency: z.ZodString;
439
- type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
440
- recurring: z.ZodOptional<z.ZodNullable<z.ZodObject<{
441
- interval: z.ZodString;
442
- }, z.core.$strip>>>;
443
- product: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
- active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
445
- providers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
446
- metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
447
- created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
448
- }, z.core.$strip>>>>, z.ZodTransform<{
449
- id: string;
450
- unit_amount: string;
451
- currency: string;
452
- key?: string | null | undefined;
453
- type?: string | null | undefined;
454
- recurring?: {
455
- interval: string;
456
- } | null | undefined;
457
- product?: string | null | undefined;
458
- active?: boolean | null | undefined;
459
- providers?: string[] | null | undefined;
460
- metadata?: Record<string, string> | null | undefined;
461
- created_at?: string | null | undefined;
462
- }[], {
463
- id: string;
464
- unit_amount: string;
465
- currency: string;
466
- key?: string | null | undefined;
467
- type?: string | null | undefined;
468
- recurring?: {
469
- interval: string;
470
- } | null | undefined;
471
- product?: string | null | undefined;
472
- active?: boolean | null | undefined;
473
- providers?: string[] | null | undefined;
474
- metadata?: Record<string, string> | null | undefined;
475
- created_at?: string | null | undefined;
476
- }[] | null | undefined>>;
477
- }, z.core.$strip>;
478
- export type Product = z.infer<typeof productSchema>;
479
463
  export declare const tierChangePreviewSchema: z.ZodObject<{
480
464
  action: z.ZodString;
481
465
  price_id: z.ZodString;
@@ -495,12 +479,12 @@ export declare const tierChangeSchema: z.ZodObject<{
495
479
  effective: z.ZodOptional<z.ZodNullable<z.ZodString>>;
496
480
  price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
497
481
  subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
498
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
482
  next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
500
483
  type: z.ZodString;
501
484
  redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
502
485
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
503
486
  }, z.core.$strip>>>;
487
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
504
488
  }, z.core.$strip>>>;
505
489
  delayed_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
506
490
  currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -511,10 +495,6 @@ export declare const tierChangeSchema: z.ZodObject<{
511
495
  operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
496
  }, z.core.$strip>;
513
497
  export type TierChange = z.infer<typeof tierChangeSchema>;
514
- export declare const solanaCancelTxSchema: z.ZodObject<{
515
- transaction: z.ZodString;
516
- subscription_pda: z.ZodOptional<z.ZodNullable<z.ZodString>>;
517
- }, z.core.$strip>;
518
498
  export declare const solanaTokenSchema: z.ZodObject<{
519
499
  symbol: z.ZodString;
520
500
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -608,100 +588,163 @@ export declare const solanaTokensSchema: z.ZodObject<{
608
588
  } | null | undefined;
609
589
  }[] | null | undefined>>;
610
590
  }, z.core.$strip>;
611
- export declare const solanaConfigSchema: z.ZodObject<{
612
- network: z.ZodString;
613
- chain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
614
- rpcUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
615
- explorerCluster: z.ZodOptional<z.ZodNullable<z.ZodString>>;
616
- preferredToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
617
- tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
618
- symbol: z.ZodString;
619
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
- mint: z.ZodString;
591
+ /**
592
+ * The merchant's browser payment setup: its armed PSPs with their public
593
+ * values and, with a Solana PSP, the network and accepted tokens a wallet
594
+ * adapter is configured with.
595
+ */
596
+ export declare const paymentConfigSchema: z.ZodObject<{
597
+ psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
598
+ psp_id: z.ZodString;
599
+ key: z.ZodString;
600
+ rail: z.ZodString;
601
+ custodian: z.ZodString;
602
+ display_name: z.ZodString;
603
+ flow: z.ZodString;
604
+ config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
605
+ checkout: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
606
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
607
+ retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
608
+ }, z.core.$strip>>>>, z.ZodTransform<{
609
+ psp_id: string;
610
+ key: string;
611
+ rail: string;
612
+ custodian: string;
613
+ display_name: string;
614
+ flow: string;
615
+ config?: Record<string, string> | null | undefined;
616
+ checkout?: boolean | null | undefined;
617
+ status?: string | null | undefined;
618
+ retry_after?: number | null | undefined;
619
+ }[], {
620
+ psp_id: string;
621
+ key: string;
622
+ rail: string;
623
+ custodian: string;
624
+ display_name: string;
625
+ flow: string;
626
+ config?: Record<string, string> | null | undefined;
627
+ checkout?: boolean | null | undefined;
628
+ status?: string | null | undefined;
629
+ retry_after?: number | null | undefined;
630
+ }[] | null | undefined>>;
631
+ solana: z.ZodOptional<z.ZodNullable<z.ZodObject<{
632
+ network: z.ZodString;
633
+ chain: z.ZodString;
634
+ preferred_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
635
+ tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
636
+ symbol: z.ZodString;
637
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
638
+ mint: z.ZodString;
639
+ decimals: z.ZodNumber;
640
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
641
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
642
+ }, z.core.$strip>>>>, z.ZodTransform<{
643
+ symbol: string;
644
+ mint: string;
645
+ decimals: number;
646
+ name?: string | null | undefined;
647
+ preferred?: boolean | null | undefined;
648
+ recurring_eligible?: boolean | null | undefined;
649
+ }[], {
650
+ symbol: string;
651
+ mint: string;
652
+ decimals: number;
653
+ name?: string | null | undefined;
654
+ preferred?: boolean | null | undefined;
655
+ recurring_eligible?: boolean | null | undefined;
656
+ }[] | null | undefined>>;
657
+ }, z.core.$strip>>>;
658
+ }, z.core.$strip>;
659
+ export type PaymentConfig = z.infer<typeof paymentConfigSchema>;
660
+ /**
661
+ * What a browser needs to know about the deployment and its merchant
662
+ * (`GET /config`): the mount's capabilities, the currency registry and the
663
+ * merchant's payment setup (null when the request resolves no merchant).
664
+ */
665
+ export declare const publicConfigSchema: z.ZodObject<{
666
+ capabilities: z.ZodObject<{
667
+ route_groups: z.ZodRecord<z.ZodString, z.ZodBoolean>;
668
+ features: z.ZodRecord<z.ZodString, z.ZodBoolean>;
669
+ }, z.core.$strip>;
670
+ currencies: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
671
+ code: z.ZodString;
621
672
  decimals: z.ZodNumber;
622
- price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
623
- preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
624
- recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
625
- quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
626
- amount: z.ZodString;
627
- units: z.ZodString;
628
- token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
629
- fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
630
- fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
631
- quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
632
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
633
- }, z.core.$strip>>>;
634
- balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
635
- amount: z.ZodString;
636
- units: z.ZodString;
637
- sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
638
- }, z.core.$strip>>>;
673
+ minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
639
674
  }, z.core.$strip>>>>, z.ZodTransform<{
640
- symbol: string;
641
- mint: string;
675
+ code: string;
642
676
  decimals: number;
643
- name?: string | null | undefined;
644
- price?: string | null | undefined;
645
- preferred?: boolean | null | undefined;
646
- recurring_eligible?: boolean | null | undefined;
647
- quote?: {
648
- amount: string;
649
- units: string;
650
- token_price_usd?: string | null | undefined;
651
- fx_rate?: string | null | undefined;
652
- fx_currency?: string | null | undefined;
653
- quoted_at?: string | null | undefined;
654
- expires_at?: string | null | undefined;
655
- } | null | undefined;
656
- balance?: {
657
- amount: string;
658
- units: string;
659
- sufficient?: boolean | null | undefined;
660
- } | null | undefined;
677
+ minor_decimals?: number | null | undefined;
661
678
  }[], {
662
- symbol: string;
663
- mint: string;
679
+ code: string;
664
680
  decimals: number;
665
- name?: string | null | undefined;
666
- price?: string | null | undefined;
667
- preferred?: boolean | null | undefined;
668
- recurring_eligible?: boolean | null | undefined;
669
- quote?: {
670
- amount: string;
671
- units: string;
672
- token_price_usd?: string | null | undefined;
673
- fx_rate?: string | null | undefined;
674
- fx_currency?: string | null | undefined;
675
- quoted_at?: string | null | undefined;
676
- expires_at?: string | null | undefined;
677
- } | null | undefined;
678
- balance?: {
679
- amount: string;
680
- units: string;
681
- sufficient?: boolean | null | undefined;
682
- } | null | undefined;
681
+ minor_decimals?: number | null | undefined;
683
682
  }[] | null | undefined>>;
684
- features: z.ZodOptional<z.ZodNullable<z.ZodObject<{
685
- solanaPay: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
686
- recurringSubscriptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
687
- solanaPayRecurringSubscriptions: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
683
+ payment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
684
+ psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
685
+ psp_id: z.ZodString;
686
+ key: z.ZodString;
687
+ rail: z.ZodString;
688
+ custodian: z.ZodString;
689
+ display_name: z.ZodString;
690
+ flow: z.ZodString;
691
+ config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
692
+ checkout: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
693
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
694
+ retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
695
+ }, z.core.$strip>>>>, z.ZodTransform<{
696
+ psp_id: string;
697
+ key: string;
698
+ rail: string;
699
+ custodian: string;
700
+ display_name: string;
701
+ flow: string;
702
+ config?: Record<string, string> | null | undefined;
703
+ checkout?: boolean | null | undefined;
704
+ status?: string | null | undefined;
705
+ retry_after?: number | null | undefined;
706
+ }[], {
707
+ psp_id: string;
708
+ key: string;
709
+ rail: string;
710
+ custodian: string;
711
+ display_name: string;
712
+ flow: string;
713
+ config?: Record<string, string> | null | undefined;
714
+ checkout?: boolean | null | undefined;
715
+ status?: string | null | undefined;
716
+ retry_after?: number | null | undefined;
717
+ }[] | null | undefined>>;
718
+ solana: z.ZodOptional<z.ZodNullable<z.ZodObject<{
719
+ network: z.ZodString;
720
+ chain: z.ZodString;
721
+ preferred_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
722
+ tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
723
+ symbol: z.ZodString;
724
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
725
+ mint: z.ZodString;
726
+ decimals: z.ZodNumber;
727
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
728
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
729
+ }, z.core.$strip>>>>, z.ZodTransform<{
730
+ symbol: string;
731
+ mint: string;
732
+ decimals: number;
733
+ name?: string | null | undefined;
734
+ preferred?: boolean | null | undefined;
735
+ recurring_eligible?: boolean | null | undefined;
736
+ }[], {
737
+ symbol: string;
738
+ mint: string;
739
+ decimals: number;
740
+ name?: string | null | undefined;
741
+ preferred?: boolean | null | undefined;
742
+ recurring_eligible?: boolean | null | undefined;
743
+ }[] | null | undefined>>;
744
+ }, z.core.$strip>>>;
688
745
  }, z.core.$strip>>>;
689
746
  }, z.core.$strip>;
690
- export type SolanaConfig = z.infer<typeof solanaConfigSchema>;
691
- export declare const solanaTierChangeTxSchema: z.ZodObject<{
692
- transaction: z.ZodString;
693
- kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
694
- new_subscription_pda: z.ZodOptional<z.ZodNullable<z.ZodString>>;
695
- }, z.core.$strip>;
696
- export type SolanaTierChangeTx = z.infer<typeof solanaTierChangeTxSchema>;
697
- export declare const solanaTierChangeSchema: z.ZodObject<{
698
- subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
699
- new_subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
700
- kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
701
- status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
702
- already_confirmed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
703
- }, z.core.$strip>;
704
- export type SolanaTierChange = z.infer<typeof solanaTierChangeSchema>;
747
+ export type PublicConfig = z.infer<typeof publicConfigSchema>;
705
748
  /** An in-page card setup; `payment_method_id` is set once the card is saved. */
706
749
  export declare const cardSetupSchema: z.ZodObject<{
707
750
  id: z.ZodString;
@@ -714,18 +757,21 @@ export declare const paymentAuthenticationSchema: z.ZodObject<{
714
757
  client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
715
758
  }, z.core.$strip>;
716
759
  export type PaymentAuthentication = z.infer<typeof paymentAuthenticationSchema>;
717
- /** What a card setup hands the server: tokenized data only, never a PAN. */
760
+ /**
761
+ * What a card setup hands the server: tokenized data only, never a PAN.
762
+ * OpenRails reads the saved card's brand, last four and expiry from the PSP.
763
+ */
718
764
  interface NewCardFields {
719
- /** OpenRails PSP key the card is saved with (e.g. "nmi"); required. */
720
- provider: string;
721
- name_on_card?: string;
722
- country?: string;
723
- zip?: string;
724
- email?: string;
725
- /** Collect.js display metadata: last four digits, brand, MM/YY. */
726
- last_four?: string;
727
- card_type?: string;
728
- expiry_date?: string;
765
+ /** The PSP the card is saved with (`psp_id` of a rail option); required. */
766
+ psp_id: string;
767
+ billing_details?: {
768
+ name?: string;
769
+ email?: string;
770
+ address?: {
771
+ postal_code?: string;
772
+ country?: string;
773
+ };
774
+ };
729
775
  }
730
776
  /**
731
777
  * A card to save: a token from the PSP's own fields (`payment_token`), or,
@@ -740,15 +786,15 @@ export type NewCard = NewCardFields & ({
740
786
  payment_token?: never;
741
787
  });
742
788
  /**
743
- * A minted hosted checkout session. `id` reads and pays it with no other
744
- * credential (`client.checkoutSource(id)`); hand it to this customer's
745
- * browser only. `url` is the shared payment page (`<CheckoutFrame url>`),
746
- * absent when the app renders `<Checkout>` itself.
789
+ * A minted checkout session. `id` reads and pays it with no other credential
790
+ * (`client.checkoutSource(id)`); hand it to this customer's browser only.
791
+ * `url` is the shared payment page (`<CheckoutFrame url>`), null when the app
792
+ * renders `<Checkout>` itself.
747
793
  */
748
- export declare const hostedCheckoutLinkSchema: z.ZodObject<{
794
+ export declare const checkoutSessionLinkSchema: z.ZodObject<{
749
795
  id: z.ZodString;
750
- url: z.ZodOptional<z.ZodString>;
796
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
751
797
  expires_at: z.ZodString;
752
798
  }, z.core.$strip>;
753
- export type HostedCheckoutLink = z.infer<typeof hostedCheckoutLinkSchema>;
799
+ export type CheckoutSessionLink = z.infer<typeof checkoutSessionLinkSchema>;
754
800
  export {};