@openrails/billing-ui 0.236.0 → 0.238.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 +87 -9
- package/README.md +78 -83
- package/dist/account/account-billing.d.ts +1 -1
- package/dist/account/payment-methods-panel.d.ts +2 -2
- package/dist/authenticate.d.ts +5 -4
- package/dist/buy-button.d.ts +17 -10
- package/dist/client/client.d.ts +52 -23
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +24 -218
- package/dist/client/generated/wire.d.ts +39 -200
- package/dist/client/index.d.ts +2 -1
- package/dist/client/token-source.d.ts +60 -0
- package/dist/client/types.d.ts +108 -199
- package/dist/client-Bi_lP_M0.js +932 -0
- package/dist/client-Bi_lP_M0.js.map +1 -0
- package/dist/client.js +2 -2
- package/dist/components/eyebrow.d.ts +5 -0
- package/dist/embedded-checkout.d.ts +22 -0
- package/dist/{hooks-2d-XjpuI.js → hooks-Bk80rNv8.js} +99 -90
- package/dist/hooks-Bk80rNv8.js.map +1 -0
- package/dist/index.d.ts +5 -8
- package/dist/index.js +1149 -2163
- package/dist/index.js.map +1 -1
- package/dist/modal.d.ts +3 -9
- package/dist/offers.d.ts +10 -9
- package/dist/psp.d.ts +0 -8
- package/dist/react/config.d.ts +17 -12
- package/dist/react/context.d.ts +3 -1
- package/dist/react/hooks.d.ts +5 -5
- package/dist/react/index.d.ts +1 -1
- package/dist/react.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/tokenized-card-form.d.ts +5 -1
- package/dist/types.d.ts +12 -250
- package/docs/payment-form-contract.md +31 -74
- package/package.json +1 -2
- package/dist/checkout-frame.d.ts +0 -17
- package/dist/checkout-page.d.ts +0 -21
- package/dist/checkout.d.ts +0 -22
- package/dist/client/checkout.d.ts +0 -28
- package/dist/client-BuvolBPT.js +0 -1092
- package/dist/client-BuvolBPT.js.map +0 -1
- package/dist/components/ccbill-fields.d.ts +0 -8
- package/dist/components/methods.d.ts +0 -13
- package/dist/components/summary.d.ts +0 -12
- package/dist/fixtures.d.ts +0 -9
- package/dist/frame.d.ts +0 -47
- package/dist/hooks-2d-XjpuI.js.map +0 -1
- package/dist/lib/rail-meta.d.ts +0 -15
- package/dist/lib/redirect.d.ts +0 -2
- package/dist/source.d.ts +0 -5
package/dist/client/types.d.ts
CHANGED
|
@@ -82,33 +82,27 @@ export declare const cardSummarySchema: z.ZodObject<{
|
|
|
82
82
|
exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
83
83
|
}, z.core.$strip>;
|
|
84
84
|
export type CardSummary = z.infer<typeof cardSummarySchema>;
|
|
85
|
-
export declare const paymentOperationSchema: z.ZodObject<{
|
|
86
|
-
id: z.ZodString;
|
|
87
|
-
status: z.ZodString;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
export type PaymentOperation = z.infer<typeof paymentOperationSchema>;
|
|
90
85
|
export declare const paymentRecoverySchema: z.ZodObject<{
|
|
91
86
|
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
87
|
retryable: z.ZodBoolean;
|
|
93
88
|
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
-
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
95
|
-
id: z.ZodString;
|
|
96
|
-
status: z.ZodString;
|
|
97
|
-
}, z.core.$strip>>>;
|
|
98
89
|
order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
90
|
}, z.core.$strip>;
|
|
100
91
|
export type PaymentRecovery = z.infer<typeof paymentRecoverySchema>;
|
|
101
92
|
/**
|
|
102
|
-
*
|
|
103
|
-
* `
|
|
104
|
-
*
|
|
93
|
+
* What the customer completes before an action or payment can finish:
|
|
94
|
+
* `authenticate` runs the PSP's own script with `payload` (Stripe.js
|
|
95
|
+
* `handleNextAction` with `client_secret`), then the payable is confirmed;
|
|
96
|
+
* `redirect_to_url` leaves for `url`; with `solana_sign_transactions` the
|
|
97
|
+
* wallet signs and sends `transactions` in order and the action is repeated
|
|
98
|
+
* with the last signature.
|
|
105
99
|
*/
|
|
106
100
|
export declare const nextActionSchema: z.ZodObject<{
|
|
107
101
|
type: z.ZodString;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, z.core.$strip>>>;
|
|
102
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
111
104
|
transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
105
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
112
106
|
}, z.core.$strip>;
|
|
113
107
|
export type NextAction = z.infer<typeof nextActionSchema>;
|
|
114
108
|
/**
|
|
@@ -242,18 +236,14 @@ export declare const subscriptionSchema: z.ZodObject<{
|
|
|
242
236
|
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
237
|
retryable: z.ZodBoolean;
|
|
244
238
|
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
-
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
246
|
-
id: z.ZodString;
|
|
247
|
-
status: z.ZodString;
|
|
248
|
-
}, z.core.$strip>>>;
|
|
249
239
|
order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
250
240
|
}, z.core.$strip>>>;
|
|
251
241
|
next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
252
242
|
type: z.ZodString;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}, z.core.$strip>>>;
|
|
243
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
256
245
|
transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
246
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
257
247
|
}, z.core.$strip>>>;
|
|
258
248
|
created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
259
249
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -327,22 +317,14 @@ export declare const paymentFailureSchema: z.ZodObject<{
|
|
|
327
317
|
}, z.core.$strip>;
|
|
328
318
|
export type PaymentFailure = z.infer<typeof paymentFailureSchema>;
|
|
329
319
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* with `client_secret`); `redirect_to_url` leaves for `url`.
|
|
320
|
+
* One line of an order. A purchased line names its price and product; a
|
|
321
|
+
* usage order's line names its accrual source (`metered:<meter>`) instead.
|
|
333
322
|
*/
|
|
334
|
-
export declare const orderNextActionSchema: z.ZodObject<{
|
|
335
|
-
type: z.ZodString;
|
|
336
|
-
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
337
|
-
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
338
|
-
transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
339
|
-
payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
340
|
-
}, z.core.$strip>;
|
|
341
|
-
export type OrderNextAction = z.infer<typeof orderNextActionSchema>;
|
|
342
323
|
export declare const orderLineSchema: z.ZodObject<{
|
|
343
324
|
id: z.ZodString;
|
|
344
|
-
price_id: z.ZodString
|
|
345
|
-
product_id: z.ZodString
|
|
325
|
+
price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
346
328
|
description: z.ZodString;
|
|
347
329
|
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
348
330
|
unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
@@ -354,11 +336,12 @@ export declare const orderLineSchema: z.ZodObject<{
|
|
|
354
336
|
}, z.core.$strip>;
|
|
355
337
|
export type OrderLine = z.infer<typeof orderLineSchema>;
|
|
356
338
|
/**
|
|
357
|
-
* A purchase,
|
|
358
|
-
* lines and total, read and paid
|
|
359
|
-
* order's (`open | processing |
|
|
360
|
-
* `payment.status`
|
|
361
|
-
* requires_action | processing |
|
|
339
|
+
* A purchase, a subscription's renewal (`origin: subscription`) or usage
|
|
340
|
+
* billed in arrears (`origin: usage`): frozen lines and total, read and paid
|
|
341
|
+
* by its own customer. `status` is the order's (`open | processing |
|
|
342
|
+
* complete | canceled | expired | void | uncollectible`); `payment.status`
|
|
343
|
+
* its payment's (`requires_payment_method | requires_action | processing |
|
|
344
|
+
* succeeded`).
|
|
362
345
|
*/
|
|
363
346
|
export declare const orderSchema: z.ZodObject<{
|
|
364
347
|
id: z.ZodString;
|
|
@@ -370,8 +353,9 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
370
353
|
total: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
371
354
|
lines: z.ZodArray<z.ZodObject<{
|
|
372
355
|
id: z.ZodString;
|
|
373
|
-
price_id: z.ZodString
|
|
374
|
-
product_id: z.ZodString
|
|
356
|
+
price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
|
+
product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
358
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
375
359
|
description: z.ZodString;
|
|
376
360
|
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
377
361
|
unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
@@ -413,6 +397,11 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
413
397
|
}[] | null | undefined>>;
|
|
414
398
|
checkout: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
415
399
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
400
|
+
ui_mode: z.ZodCatch<z.ZodEnum<{
|
|
401
|
+
embedded: "embedded";
|
|
402
|
+
hosted: "hosted";
|
|
403
|
+
}>>;
|
|
404
|
+
expires_at: z.ZodString;
|
|
416
405
|
success_url: z.ZodString;
|
|
417
406
|
cancel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
418
407
|
saved_payment_methods: z.ZodBoolean;
|
|
@@ -423,11 +412,24 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
423
412
|
period_ends_at: z.ZodString;
|
|
424
413
|
due_at: z.ZodString;
|
|
425
414
|
}, z.core.$strip>>>;
|
|
415
|
+
usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
416
|
+
period_starts_at: z.ZodString;
|
|
417
|
+
period_ends_at: z.ZodString;
|
|
418
|
+
due_at: z.ZodString;
|
|
419
|
+
amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
420
|
+
amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
421
|
+
collection_method: z.ZodString;
|
|
422
|
+
next_collection_attempt_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
423
|
+
po_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
|
+
delinquent: z.ZodBoolean;
|
|
426
|
+
}, z.core.$strip>>>;
|
|
426
427
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
428
|
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
428
429
|
canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
430
|
expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
431
|
voided_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
+
uncollectible_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
433
|
created_at: z.ZodString;
|
|
432
434
|
}, z.core.$strip>;
|
|
433
435
|
export type Order = z.infer<typeof orderSchema>;
|
|
@@ -671,14 +673,23 @@ export declare const paymentSchema: z.ZodObject<{
|
|
|
671
673
|
}, z.core.$strip>>>;
|
|
672
674
|
}, z.core.$strip>;
|
|
673
675
|
export type Payment = z.infer<typeof paymentSchema>;
|
|
674
|
-
/**
|
|
676
|
+
/**
|
|
677
|
+
* A customer's money in one currency, as of `as_of`. `accrued_amount` is what
|
|
678
|
+
* its running charges have charged and the ledger does not hold yet, already
|
|
679
|
+
* taken off `available_amount`; until `depletes_at` (null with no running
|
|
680
|
+
* charge) show `available_amount - accrual_rate_per_hour x hours since as_of`.
|
|
681
|
+
*/
|
|
675
682
|
export declare const balanceSchema: z.ZodObject<{
|
|
676
683
|
currency: z.ZodString;
|
|
677
684
|
billing_mode: z.ZodString;
|
|
678
685
|
balance_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
679
686
|
held_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
687
|
+
accrued_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
680
688
|
available_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
681
689
|
owed_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
690
|
+
accrual_rate_per_hour: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
691
|
+
as_of: z.ZodString;
|
|
692
|
+
depletes_at: z.ZodNullable<z.ZodString>;
|
|
682
693
|
}, z.core.$strip>;
|
|
683
694
|
export type Balance = z.infer<typeof balanceSchema>;
|
|
684
695
|
/**
|
|
@@ -692,8 +703,12 @@ export declare const accountSchema: z.ZodObject<{
|
|
|
692
703
|
billing_mode: z.ZodString;
|
|
693
704
|
balance_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
694
705
|
held_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
706
|
+
accrued_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
695
707
|
available_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
696
708
|
owed_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
709
|
+
accrual_rate_per_hour: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
710
|
+
as_of: z.ZodString;
|
|
711
|
+
depletes_at: z.ZodNullable<z.ZodString>;
|
|
697
712
|
}, z.core.$strip>>;
|
|
698
713
|
default_payment_methods: z.ZodArray<z.ZodObject<{
|
|
699
714
|
currency: z.ZodString;
|
|
@@ -702,33 +717,6 @@ export declare const accountSchema: z.ZodObject<{
|
|
|
702
717
|
unread_notifications: z.ZodNumber;
|
|
703
718
|
}, z.core.$strip>;
|
|
704
719
|
export type Account = z.infer<typeof accountSchema>;
|
|
705
|
-
export declare const invoiceSchema: z.ZodObject<{
|
|
706
|
-
id: z.ZodString;
|
|
707
|
-
currency: z.ZodString;
|
|
708
|
-
invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
709
|
-
period_starts_at: z.ZodString;
|
|
710
|
-
period_ends_at: z.ZodString;
|
|
711
|
-
total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
712
|
-
amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
713
|
-
amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
714
|
-
status: z.ZodString;
|
|
715
|
-
issued_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
716
|
-
due_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
717
|
-
delinquent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
718
|
-
paid_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
719
|
-
recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
720
|
-
last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
721
|
-
retryable: z.ZodBoolean;
|
|
722
|
-
blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
723
|
-
operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
724
|
-
id: z.ZodString;
|
|
725
|
-
status: z.ZodString;
|
|
726
|
-
}, z.core.$strip>>>;
|
|
727
|
-
order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
728
|
-
}, z.core.$strip>>>;
|
|
729
|
-
created_at: z.ZodString;
|
|
730
|
-
}, z.core.$strip>;
|
|
731
|
-
export type Invoice = z.infer<typeof invoiceSchema>;
|
|
732
720
|
/** Currency code (upper case) to its native-unit scale. */
|
|
733
721
|
export type CurrencyScales = Readonly<Record<string, number>>;
|
|
734
722
|
export declare const currencySchema: z.ZodObject<{
|
|
@@ -758,10 +746,10 @@ export declare const subscriptionChangeSchema: z.ZodObject<{
|
|
|
758
746
|
subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
759
747
|
next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
760
748
|
type: z.ZodString;
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
}, z.core.$strip>>>;
|
|
749
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
764
751
|
transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
752
|
+
payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
765
753
|
}, z.core.$strip>>>;
|
|
766
754
|
delayed_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
767
755
|
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -769,102 +757,8 @@ export declare const subscriptionChangeSchema: z.ZodObject<{
|
|
|
769
757
|
next_charge_amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
|
|
770
758
|
next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
771
759
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
772
|
-
operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
773
760
|
}, z.core.$strip>;
|
|
774
761
|
export type SubscriptionChange = z.infer<typeof subscriptionChangeSchema>;
|
|
775
|
-
export declare const solanaTokenSchema: z.ZodObject<{
|
|
776
|
-
symbol: z.ZodString;
|
|
777
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
778
|
-
mint: z.ZodString;
|
|
779
|
-
decimals: z.ZodNumber;
|
|
780
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
-
preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
782
|
-
recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
783
|
-
quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
784
|
-
amount: z.ZodString;
|
|
785
|
-
units: z.ZodString;
|
|
786
|
-
token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
787
|
-
fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
788
|
-
fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
789
|
-
quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
790
|
-
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
791
|
-
}, z.core.$strip>>>;
|
|
792
|
-
balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
793
|
-
amount: z.ZodString;
|
|
794
|
-
units: z.ZodString;
|
|
795
|
-
sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
796
|
-
}, z.core.$strip>>>;
|
|
797
|
-
}, z.core.$strip>;
|
|
798
|
-
export type SolanaToken = z.infer<typeof solanaTokenSchema>;
|
|
799
|
-
export declare const solanaTokensSchema: z.ZodObject<{
|
|
800
|
-
tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
801
|
-
symbol: z.ZodString;
|
|
802
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
803
|
-
mint: z.ZodString;
|
|
804
|
-
decimals: z.ZodNumber;
|
|
805
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
806
|
-
preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
807
|
-
recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
808
|
-
quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
809
|
-
amount: z.ZodString;
|
|
810
|
-
units: z.ZodString;
|
|
811
|
-
token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
812
|
-
fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
813
|
-
fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
814
|
-
quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
815
|
-
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
816
|
-
}, z.core.$strip>>>;
|
|
817
|
-
balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
818
|
-
amount: z.ZodString;
|
|
819
|
-
units: z.ZodString;
|
|
820
|
-
sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
821
|
-
}, z.core.$strip>>>;
|
|
822
|
-
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
823
|
-
symbol: string;
|
|
824
|
-
mint: string;
|
|
825
|
-
decimals: number;
|
|
826
|
-
name?: string | null | undefined;
|
|
827
|
-
price?: string | null | undefined;
|
|
828
|
-
preferred?: boolean | null | undefined;
|
|
829
|
-
recurring_eligible?: boolean | null | undefined;
|
|
830
|
-
quote?: {
|
|
831
|
-
amount: string;
|
|
832
|
-
units: string;
|
|
833
|
-
token_price_usd?: string | null | undefined;
|
|
834
|
-
fx_rate?: string | null | undefined;
|
|
835
|
-
fx_currency?: string | null | undefined;
|
|
836
|
-
quoted_at?: string | null | undefined;
|
|
837
|
-
expires_at?: string | null | undefined;
|
|
838
|
-
} | null | undefined;
|
|
839
|
-
balance?: {
|
|
840
|
-
amount: string;
|
|
841
|
-
units: string;
|
|
842
|
-
sufficient?: boolean | null | undefined;
|
|
843
|
-
} | null | undefined;
|
|
844
|
-
}[], {
|
|
845
|
-
symbol: string;
|
|
846
|
-
mint: string;
|
|
847
|
-
decimals: number;
|
|
848
|
-
name?: string | null | undefined;
|
|
849
|
-
price?: string | null | undefined;
|
|
850
|
-
preferred?: boolean | null | undefined;
|
|
851
|
-
recurring_eligible?: boolean | null | undefined;
|
|
852
|
-
quote?: {
|
|
853
|
-
amount: string;
|
|
854
|
-
units: string;
|
|
855
|
-
token_price_usd?: string | null | undefined;
|
|
856
|
-
fx_rate?: string | null | undefined;
|
|
857
|
-
fx_currency?: string | null | undefined;
|
|
858
|
-
quoted_at?: string | null | undefined;
|
|
859
|
-
expires_at?: string | null | undefined;
|
|
860
|
-
} | null | undefined;
|
|
861
|
-
balance?: {
|
|
862
|
-
amount: string;
|
|
863
|
-
units: string;
|
|
864
|
-
sufficient?: boolean | null | undefined;
|
|
865
|
-
} | null | undefined;
|
|
866
|
-
}[] | null | undefined>>;
|
|
867
|
-
}, z.core.$strip>;
|
|
868
762
|
/**
|
|
869
763
|
* The merchant's browser payment setup: its armed PSPs with their public
|
|
870
764
|
* values and, with a Solana PSP, the network and accepted tokens a wallet
|
|
@@ -947,19 +841,19 @@ export declare const captchaConfigSchema: z.ZodObject<{
|
|
|
947
841
|
token_header: z.ZodString;
|
|
948
842
|
}, z.core.$strip>;
|
|
949
843
|
export type CaptchaConfig = z.infer<typeof captchaConfigSchema>;
|
|
950
|
-
/**
|
|
951
|
-
* What a browser needs to know about the deployment and its merchant
|
|
952
|
-
* (`GET /config`): the mount's capabilities, the currency registry, the
|
|
953
|
-
* merchant's payment setup (null when the request resolves no merchant) and
|
|
954
|
-
* the captcha (null when the deployment challenges nobody).
|
|
955
|
-
*/
|
|
956
844
|
/** The merchant as its customers see it; logo and support are https. */
|
|
957
845
|
export declare const publicMerchantSchema: z.ZodObject<{
|
|
958
846
|
display_name: z.ZodString;
|
|
959
847
|
logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
960
848
|
support_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
849
|
+
embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
|
|
961
850
|
}, z.core.$strip>;
|
|
962
851
|
export type PublicMerchant = z.infer<typeof publicMerchantSchema>;
|
|
852
|
+
/**
|
|
853
|
+
* What any browser needs to know about the deployment (`GET /config`, no
|
|
854
|
+
* credential): the mount's capabilities, the currency registry and the
|
|
855
|
+
* captcha (null when the deployment challenges nobody).
|
|
856
|
+
*/
|
|
963
857
|
export declare const publicConfigSchema: z.ZodObject<{
|
|
964
858
|
capabilities: z.ZodObject<{
|
|
965
859
|
route_groups: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
@@ -978,7 +872,25 @@ export declare const publicConfigSchema: z.ZodObject<{
|
|
|
978
872
|
decimals: number;
|
|
979
873
|
minor_decimals?: number | null | undefined;
|
|
980
874
|
}[] | null | undefined>>;
|
|
981
|
-
|
|
875
|
+
captcha: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
876
|
+
provider: z.ZodString;
|
|
877
|
+
site_key: z.ZodString;
|
|
878
|
+
script_url: z.ZodString;
|
|
879
|
+
action: z.ZodString;
|
|
880
|
+
token_header: z.ZodString;
|
|
881
|
+
}, z.core.$strip>>>;
|
|
882
|
+
network: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
883
|
+
issuer: z.ZodString;
|
|
884
|
+
client_id: z.ZodString;
|
|
885
|
+
}, z.core.$strip>>>;
|
|
886
|
+
}, z.core.$strip>;
|
|
887
|
+
export type PublicConfig = z.infer<typeof publicConfigSchema>;
|
|
888
|
+
/**
|
|
889
|
+
* What a customer's browser needs to know about the merchant it pays
|
|
890
|
+
* (`GET /me/config`): its payment setup and how it presents itself.
|
|
891
|
+
*/
|
|
892
|
+
export declare const customerConfigSchema: z.ZodObject<{
|
|
893
|
+
payment: z.ZodObject<{
|
|
982
894
|
psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
983
895
|
psp_id: z.ZodString;
|
|
984
896
|
key: z.ZodString;
|
|
@@ -1040,25 +952,33 @@ export declare const publicConfigSchema: z.ZodObject<{
|
|
|
1040
952
|
recurring_eligible?: boolean | null | undefined;
|
|
1041
953
|
}[] | null | undefined>>;
|
|
1042
954
|
}, z.core.$strip>>>;
|
|
1043
|
-
}, z.core.$strip
|
|
1044
|
-
merchant: z.
|
|
955
|
+
}, z.core.$strip>;
|
|
956
|
+
merchant: z.ZodObject<{
|
|
1045
957
|
display_name: z.ZodString;
|
|
1046
958
|
logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1047
959
|
support_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
provider: z.ZodString;
|
|
1051
|
-
site_key: z.ZodString;
|
|
1052
|
-
script_url: z.ZodString;
|
|
1053
|
-
action: z.ZodString;
|
|
1054
|
-
token_header: z.ZodString;
|
|
1055
|
-
}, z.core.$strip>>>;
|
|
960
|
+
embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
|
|
961
|
+
}, z.core.$strip>;
|
|
1056
962
|
}, z.core.$strip>;
|
|
1057
|
-
export type
|
|
1058
|
-
export declare const
|
|
1059
|
-
|
|
963
|
+
export type CustomerConfig = z.infer<typeof customerConfigSchema>;
|
|
964
|
+
export declare const networkLinkChallengeSchema: z.ZodObject<{
|
|
965
|
+
id: z.ZodString;
|
|
966
|
+
nonce: z.ZodString;
|
|
967
|
+
expires_at: z.ZodString;
|
|
968
|
+
}, z.core.$strip>;
|
|
969
|
+
export type NetworkLinkChallenge = z.infer<typeof networkLinkChallengeSchema>;
|
|
970
|
+
export declare const customerLinkSchema: z.ZodObject<{
|
|
971
|
+
id: z.ZodString;
|
|
972
|
+
merchant_id: z.ZodString;
|
|
973
|
+
customer_id: z.ZodString;
|
|
974
|
+
account_id: z.ZodString;
|
|
975
|
+
method: z.ZodString;
|
|
976
|
+
status: z.ZodString;
|
|
977
|
+
linked_at: z.ZodString;
|
|
978
|
+
revoked_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
979
|
+
revoked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1060
980
|
}, z.core.$strip>;
|
|
1061
|
-
export type
|
|
981
|
+
export type CustomerLink = z.infer<typeof customerLinkSchema>;
|
|
1062
982
|
/**
|
|
1063
983
|
* What a card setup hands the server: tokenized data only, never a PAN.
|
|
1064
984
|
* OpenRails reads the saved card's brand, last four and expiry from the PSP.
|
|
@@ -1088,15 +1008,4 @@ export type NewCard = NewCardFields & ({
|
|
|
1088
1008
|
card: CardEntry;
|
|
1089
1009
|
token?: never;
|
|
1090
1010
|
});
|
|
1091
|
-
/**
|
|
1092
|
-
* A minted checkout session. `id` reads and pays it with no other credential;
|
|
1093
|
-
* hand it to this customer's browser only. `url` is the shared payment page
|
|
1094
|
-
* (`<CheckoutFrame url>`), null when BuyButton renders the checkout itself.
|
|
1095
|
-
*/
|
|
1096
|
-
export declare const checkoutSessionLinkSchema: z.ZodObject<{
|
|
1097
|
-
id: z.ZodString;
|
|
1098
|
-
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1099
|
-
expires_at: z.ZodString;
|
|
1100
|
-
}, z.core.$strip>;
|
|
1101
|
-
export type CheckoutSessionLink = z.infer<typeof checkoutSessionLinkSchema>;
|
|
1102
1011
|
export {};
|