@openrails/billing-ui 0.0.0-stage → 0.230.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.
- package/CHANGELOG.md +257 -0
- package/LICENSE +21 -0
- package/README.md +211 -2
- package/dist/account/account-billing.d.ts +19 -0
- package/dist/account/cancel-dialog.d.ts +18 -0
- package/dist/account/change-card-dialog.d.ts +14 -0
- package/dist/account/format.d.ts +25 -0
- package/dist/account/notice.d.ts +3 -0
- package/dist/account/payment-history.d.ts +8 -0
- package/dist/account/payment-methods-panel.d.ts +19 -0
- package/dist/account/section.d.ts +25 -0
- package/dist/account/status-badge.d.ts +8 -0
- package/dist/account/subscriptions-panel.d.ts +19 -0
- package/dist/appearance.d.ts +23 -0
- package/dist/authenticate.d.ts +8 -0
- package/dist/checkout-frame.d.ts +17 -0
- package/dist/checkout-page.d.ts +16 -0
- package/dist/checkout.d.ts +24 -0
- package/dist/client/client.d.ts +167 -0
- package/dist/client/errors.d.ts +26 -0
- package/dist/client/generated/openrails-routes.d.ts +2 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/types.d.ts +754 -0
- package/dist/client-DhG2jv34.js +771 -0
- package/dist/client-DhG2jv34.js.map +1 -0
- package/dist/client.js +3 -0
- package/dist/components/billing-fields.d.ts +39 -0
- package/dist/components/card-brands.d.ts +6 -0
- package/dist/components/card-fields.d.ts +29 -0
- package/dist/components/ccbill-fields.d.ts +8 -0
- package/dist/components/methods.d.ts +13 -0
- package/dist/components/pay-button.d.ts +6 -0
- package/dist/components/qr.d.ts +6 -0
- package/dist/components/saved-methods.d.ts +9 -0
- package/dist/components/states.d.ts +10 -0
- package/dist/components/stripe-card.d.ts +17 -0
- package/dist/components/summary.d.ts +12 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +7 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +3 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/dist-CslWupfi.js +3311 -0
- package/dist/dist-CslWupfi.js.map +1 -0
- package/dist/errors-T-PRm3vV.js +54 -0
- package/dist/errors-T-PRm3vV.js.map +1 -0
- package/dist/fixtures.d.ts +9 -0
- package/dist/frame.d.ts +47 -0
- package/dist/hooks-DLFF-zx5.js +285 -0
- package/dist/hooks-DLFF-zx5.js.map +1 -0
- package/dist/i18n/context.d.ts +4 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/messages.d.ts +58 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +4182 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/billing.d.ts +25 -0
- package/dist/lib/card-brands.d.ts +2 -0
- package/dist/lib/card-entry.d.ts +46 -0
- package/dist/lib/ccbill.d.ts +8 -0
- package/dist/lib/collect.d.ts +51 -0
- package/dist/lib/money.d.ts +9 -0
- package/dist/lib/period.d.ts +15 -0
- package/dist/lib/rail-meta.d.ts +15 -0
- package/dist/lib/redirect.d.ts +2 -0
- package/dist/lib/stripe-appearance.d.ts +2 -0
- package/dist/lib/stripe.d.ts +2 -0
- package/dist/locales/de.d.ts +2 -0
- package/dist/locales/de.js +204 -0
- package/dist/locales/de.js.map +1 -0
- package/dist/locales/en.d.ts +201 -0
- package/dist/locales/en.js +204 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/es.d.ts +2 -0
- package/dist/locales/es.js +204 -0
- package/dist/locales/es.js.map +1 -0
- package/dist/locales/ja.d.ts +2 -0
- package/dist/locales/ja.js +195 -0
- package/dist/locales/ja.js.map +1 -0
- package/dist/locales/ko.d.ts +2 -0
- package/dist/locales/ko.js +195 -0
- package/dist/locales/ko.js.map +1 -0
- package/dist/locales/zh.d.ts +2 -0
- package/dist/locales/zh.js +195 -0
- package/dist/locales/zh.js.map +1 -0
- package/dist/modal.d.ts +12 -0
- package/dist/provider.d.ts +18 -0
- package/dist/psp.d.ts +46 -0
- package/dist/react/context.d.ts +38 -0
- package/dist/react/hooks.d.ts +76 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/provider.d.ts +18 -0
- package/dist/react/remote.d.ts +11 -0
- package/dist/react.js +37 -0
- package/dist/react.js.map +1 -0
- package/dist/save-payment-method.d.ts +26 -0
- package/dist/scope-context.d.ts +17 -0
- package/dist/scope.d.ts +6 -0
- package/dist/source.d.ts +14 -0
- package/dist/styles.css +3 -0
- package/dist/tokenized-card-form.d.ts +24 -0
- package/dist/types.d.ts +191 -0
- package/docs/1055-nmi-host-integration.md +28 -0
- package/docs/payment-form-contract.md +153 -0
- package/package.json +112 -3
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CardEntry } from '../lib/card-entry';
|
|
3
|
+
export declare const pageSchema: <T extends z.ZodType>(item: T) => z.ZodObject<{
|
|
4
|
+
data: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<T>>>, z.ZodTransform<z.core.output<T>[], z.core.output<T>[] | null | undefined>>;
|
|
5
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7
|
+
offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
8
|
+
has_more: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export interface Page<T> {
|
|
11
|
+
data: T[];
|
|
12
|
+
total?: number | null;
|
|
13
|
+
limit?: number | null;
|
|
14
|
+
offset?: number | null;
|
|
15
|
+
has_more?: boolean | null;
|
|
16
|
+
}
|
|
17
|
+
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<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
25
|
+
currency: z.ZodString;
|
|
26
|
+
auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
27
|
+
access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type SubscriptionPrice = z.infer<typeof subscriptionPriceSchema>;
|
|
30
|
+
export declare const subscriptionProductSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type SubscriptionProduct = z.infer<typeof subscriptionProductSchema>;
|
|
39
|
+
export declare const cardSummarySchema: z.ZodObject<{
|
|
40
|
+
brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
43
|
+
exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type CardSummary = z.infer<typeof cardSummarySchema>;
|
|
46
|
+
export declare const paymentOperationSchema: z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
status: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type PaymentOperation = z.infer<typeof paymentOperationSchema>;
|
|
51
|
+
export declare const paymentRecoverySchema: z.ZodObject<{
|
|
52
|
+
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
retryable: z.ZodBoolean;
|
|
54
|
+
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
|
+
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
status: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type PaymentRecovery = z.infer<typeof paymentRecoverySchema>;
|
|
61
|
+
export declare const subscriptionSchema: z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
status: z.ZodString;
|
|
64
|
+
rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
|
+
price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
payment_method_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
current_period_starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
current_period_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
cancelled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
cancel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
resumable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
76
|
+
cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
77
|
+
cancel_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
cancel_portal_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
grace_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
next_retry_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
86
|
+
currency: z.ZodString;
|
|
87
|
+
auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
88
|
+
access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
89
|
+
}, z.core.$strip>>>;
|
|
90
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
scheduled_price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
103
|
+
currency: z.ZodString;
|
|
104
|
+
auto_renew: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
105
|
+
access_duration_hours: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
107
|
+
scheduled_product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
116
|
+
brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
119
|
+
exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
120
|
+
}, z.core.$strip>>>;
|
|
121
|
+
recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
122
|
+
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
retryable: z.ZodBoolean;
|
|
124
|
+
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
status: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
}, z.core.$strip>>>;
|
|
130
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
export type Subscription = z.infer<typeof subscriptionSchema> & {
|
|
134
|
+
status: SubscriptionStatus;
|
|
135
|
+
};
|
|
136
|
+
export declare const paymentMethodSchema: z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
142
|
+
brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
145
|
+
exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
147
|
+
billing_details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
148
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
+
}, z.core.$strip>>>;
|
|
151
|
+
health: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
152
|
+
expiry_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
153
|
+
last_charged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
154
|
+
last_charge_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
156
|
+
}, z.core.$strip>>>;
|
|
157
|
+
subscriptions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
}, z.core.$strip>>>>;
|
|
161
|
+
default: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
162
|
+
collection_default_currencies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
163
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type PaymentMethod = z.infer<typeof paymentMethodSchema>;
|
|
166
|
+
export declare const paymentSchema: z.ZodObject<{
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
object: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
|
+
amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
171
|
+
amount_refunded: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
172
|
+
currency: z.ZodString;
|
|
173
|
+
subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
|
+
rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
refunded: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
176
|
+
created_at: z.ZodString;
|
|
177
|
+
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>>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
185
|
+
}, z.core.$strip>>>;
|
|
186
|
+
product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
191
|
+
tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
+
tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
193
|
+
}, z.core.$strip>>>;
|
|
194
|
+
card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
195
|
+
brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
+
exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
198
|
+
exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
199
|
+
}, z.core.$strip>>>;
|
|
200
|
+
failure: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
201
|
+
reason: z.ZodString;
|
|
202
|
+
message: z.ZodString;
|
|
203
|
+
field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
204
|
+
}, z.core.$strip>>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export type Payment = z.infer<typeof paymentSchema>;
|
|
207
|
+
export declare const invoiceSchema: z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
currency: z.ZodString;
|
|
210
|
+
invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
|
+
period_from: z.ZodString;
|
|
212
|
+
period_to: z.ZodString;
|
|
213
|
+
total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
214
|
+
amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
215
|
+
amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
216
|
+
status: z.ZodString;
|
|
217
|
+
issued_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
+
due_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
|
+
paid_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
221
|
+
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
222
|
+
retryable: z.ZodBoolean;
|
|
223
|
+
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
status: z.ZodString;
|
|
227
|
+
}, z.core.$strip>>>;
|
|
228
|
+
}, z.core.$strip>>>;
|
|
229
|
+
created_at: z.ZodString;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
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
|
+
/** Currency code (upper case) to its native-unit scale. */
|
|
391
|
+
export type CurrencyScales = Readonly<Record<string, number>>;
|
|
392
|
+
export declare const currencySchema: z.ZodObject<{
|
|
393
|
+
code: z.ZodString;
|
|
394
|
+
decimals: z.ZodNumber;
|
|
395
|
+
minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
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
|
+
export declare const tierChangePreviewSchema: z.ZodObject<{
|
|
480
|
+
action: z.ZodString;
|
|
481
|
+
price_id: z.ZodString;
|
|
482
|
+
rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
483
|
+
currency: z.ZodString;
|
|
484
|
+
amount_due_now: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
485
|
+
next_charge_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
486
|
+
next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
487
|
+
effective: z.ZodString;
|
|
488
|
+
is_estimate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
489
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
export type TierChangePreview = z.infer<typeof tierChangePreviewSchema>;
|
|
492
|
+
export declare const tierChangeSchema: z.ZodObject<{
|
|
493
|
+
status: z.ZodString;
|
|
494
|
+
action: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
495
|
+
effective: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
|
+
price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
497
|
+
subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
498
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
499
|
+
next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
500
|
+
type: z.ZodString;
|
|
501
|
+
redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
502
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
503
|
+
}, z.core.$strip>>>;
|
|
504
|
+
}, z.core.$strip>>>;
|
|
505
|
+
delayed_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
506
|
+
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
507
|
+
amount_due_now: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
508
|
+
next_charge_amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
509
|
+
next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
510
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
511
|
+
operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
512
|
+
}, z.core.$strip>;
|
|
513
|
+
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
|
+
export declare const solanaTokenSchema: z.ZodObject<{
|
|
519
|
+
symbol: z.ZodString;
|
|
520
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
521
|
+
mint: z.ZodString;
|
|
522
|
+
decimals: z.ZodNumber;
|
|
523
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
524
|
+
preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
525
|
+
recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
526
|
+
quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
527
|
+
amount: z.ZodString;
|
|
528
|
+
units: z.ZodString;
|
|
529
|
+
token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
530
|
+
fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
531
|
+
fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
532
|
+
quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
533
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
534
|
+
}, z.core.$strip>>>;
|
|
535
|
+
balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
536
|
+
amount: z.ZodString;
|
|
537
|
+
units: z.ZodString;
|
|
538
|
+
sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
539
|
+
}, z.core.$strip>>>;
|
|
540
|
+
}, z.core.$strip>;
|
|
541
|
+
export type SolanaToken = z.infer<typeof solanaTokenSchema>;
|
|
542
|
+
export declare const solanaTokensSchema: z.ZodObject<{
|
|
543
|
+
tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
544
|
+
symbol: z.ZodString;
|
|
545
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
546
|
+
mint: z.ZodString;
|
|
547
|
+
decimals: z.ZodNumber;
|
|
548
|
+
price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
549
|
+
preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
550
|
+
recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
551
|
+
quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
552
|
+
amount: z.ZodString;
|
|
553
|
+
units: z.ZodString;
|
|
554
|
+
token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
555
|
+
fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
556
|
+
fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
557
|
+
quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
558
|
+
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
559
|
+
}, z.core.$strip>>>;
|
|
560
|
+
balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
561
|
+
amount: z.ZodString;
|
|
562
|
+
units: z.ZodString;
|
|
563
|
+
sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
564
|
+
}, z.core.$strip>>>;
|
|
565
|
+
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
566
|
+
symbol: string;
|
|
567
|
+
mint: string;
|
|
568
|
+
decimals: number;
|
|
569
|
+
name?: string | null | undefined;
|
|
570
|
+
price?: string | null | undefined;
|
|
571
|
+
preferred?: boolean | null | undefined;
|
|
572
|
+
recurring_eligible?: boolean | null | undefined;
|
|
573
|
+
quote?: {
|
|
574
|
+
amount: string;
|
|
575
|
+
units: string;
|
|
576
|
+
token_price_usd?: string | null | undefined;
|
|
577
|
+
fx_rate?: string | null | undefined;
|
|
578
|
+
fx_currency?: string | null | undefined;
|
|
579
|
+
quoted_at?: string | null | undefined;
|
|
580
|
+
expires_at?: string | null | undefined;
|
|
581
|
+
} | null | undefined;
|
|
582
|
+
balance?: {
|
|
583
|
+
amount: string;
|
|
584
|
+
units: string;
|
|
585
|
+
sufficient?: boolean | null | undefined;
|
|
586
|
+
} | null | undefined;
|
|
587
|
+
}[], {
|
|
588
|
+
symbol: string;
|
|
589
|
+
mint: string;
|
|
590
|
+
decimals: number;
|
|
591
|
+
name?: string | null | undefined;
|
|
592
|
+
price?: string | null | undefined;
|
|
593
|
+
preferred?: boolean | null | undefined;
|
|
594
|
+
recurring_eligible?: boolean | null | undefined;
|
|
595
|
+
quote?: {
|
|
596
|
+
amount: string;
|
|
597
|
+
units: string;
|
|
598
|
+
token_price_usd?: string | null | undefined;
|
|
599
|
+
fx_rate?: string | null | undefined;
|
|
600
|
+
fx_currency?: string | null | undefined;
|
|
601
|
+
quoted_at?: string | null | undefined;
|
|
602
|
+
expires_at?: string | null | undefined;
|
|
603
|
+
} | null | undefined;
|
|
604
|
+
balance?: {
|
|
605
|
+
amount: string;
|
|
606
|
+
units: string;
|
|
607
|
+
sufficient?: boolean | null | undefined;
|
|
608
|
+
} | null | undefined;
|
|
609
|
+
}[] | null | undefined>>;
|
|
610
|
+
}, 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;
|
|
621
|
+
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>>>;
|
|
639
|
+
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
640
|
+
symbol: string;
|
|
641
|
+
mint: string;
|
|
642
|
+
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;
|
|
661
|
+
}[], {
|
|
662
|
+
symbol: string;
|
|
663
|
+
mint: string;
|
|
664
|
+
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;
|
|
683
|
+
}[] | 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>>;
|
|
688
|
+
}, z.core.$strip>>>;
|
|
689
|
+
}, 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>;
|
|
705
|
+
/** An in-page card setup; `payment_method_id` is set once the card is saved. */
|
|
706
|
+
export declare const cardSetupSchema: z.ZodObject<{
|
|
707
|
+
id: z.ZodString;
|
|
708
|
+
status: z.ZodString;
|
|
709
|
+
client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
710
|
+
payment_method_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
711
|
+
}, z.core.$strip>;
|
|
712
|
+
export type CardSetup = z.infer<typeof cardSetupSchema>;
|
|
713
|
+
export declare const paymentAuthenticationSchema: z.ZodObject<{
|
|
714
|
+
client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
715
|
+
}, z.core.$strip>;
|
|
716
|
+
export type PaymentAuthentication = z.infer<typeof paymentAuthenticationSchema>;
|
|
717
|
+
/** What a card setup hands the server: tokenized data only, never a PAN. */
|
|
718
|
+
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;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* A card to save: a token from the PSP's own fields (`payment_token`), or,
|
|
732
|
+
* for a PSP whose card_entry is server (`cardSetupDriver` "card"), the card
|
|
733
|
+
* itself, posted to OpenRails and never kept by this package.
|
|
734
|
+
*/
|
|
735
|
+
export type NewCard = NewCardFields & ({
|
|
736
|
+
payment_token: string;
|
|
737
|
+
card?: never;
|
|
738
|
+
} | {
|
|
739
|
+
card: CardEntry;
|
|
740
|
+
payment_token?: never;
|
|
741
|
+
});
|
|
742
|
+
/**
|
|
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.
|
|
747
|
+
*/
|
|
748
|
+
export declare const hostedCheckoutLinkSchema: z.ZodObject<{
|
|
749
|
+
id: z.ZodString;
|
|
750
|
+
url: z.ZodOptional<z.ZodString>;
|
|
751
|
+
expires_at: z.ZodString;
|
|
752
|
+
}, z.core.$strip>;
|
|
753
|
+
export type HostedCheckoutLink = z.infer<typeof hostedCheckoutLinkSchema>;
|
|
754
|
+
export {};
|