@openrails/billing-ui 0.236.0 → 0.237.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 +52 -0
- package/README.md +37 -67
- package/dist/account/account-billing.d.ts +1 -1
- package/dist/account/payment-methods-panel.d.ts +1 -1
- package/dist/buy-button.d.ts +14 -9
- package/dist/client/client.d.ts +25 -13
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +1 -199
- package/dist/client/generated/wire.d.ts +34 -185
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.d.ts +72 -141
- package/dist/client-D9G1Tgox.js +888 -0
- package/dist/client-D9G1Tgox.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-DYepYVMX.js} +2 -2
- package/dist/{hooks-2d-XjpuI.js.map → hooks-DYepYVMX.js.map} +1 -1
- package/dist/index.d.ts +3 -7
- package/dist/index.js +1131 -2150
- package/dist/index.js.map +1 -1
- package/dist/modal.d.ts +3 -9
- package/dist/offers.d.ts +4 -5
- package/dist/psp.d.ts +0 -8
- package/dist/react.js +1 -1
- 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/lib/rail-meta.d.ts +0 -15
- package/dist/lib/redirect.d.ts +0 -2
- package/dist/source.d.ts +0 -5
package/dist/modal.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface CheckoutModalProps extends CheckoutProps {
|
|
1
|
+
import { OrderCheckoutProps } from './order-checkout';
|
|
2
|
+
export interface OrderModalProps extends OrderCheckoutProps {
|
|
4
3
|
open: boolean;
|
|
5
4
|
onOpenChange: (open: boolean) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Rendered instead of the checkout while set, e.g. the host's sign-in.
|
|
8
|
-
* Clear it to continue to payment in the same modal.
|
|
9
|
-
*/
|
|
10
|
-
gate?: React.ReactNode;
|
|
11
5
|
}
|
|
12
|
-
export declare function
|
|
6
|
+
export declare function OrderModal({ open, onOpenChange, ...checkout }: OrderModalProps): import("react").JSX.Element;
|
package/dist/offers.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CheckoutAppearance } from './appearance';
|
|
2
|
-
import { Product } from './client/types';
|
|
3
|
-
import { PayResult } from './types';
|
|
2
|
+
import { Order, Product } from './client/types';
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
export interface OffersProps {
|
|
6
5
|
/**
|
|
@@ -16,10 +15,10 @@ export interface OffersProps {
|
|
|
16
15
|
*/
|
|
17
16
|
products?: Product[];
|
|
18
17
|
/**
|
|
19
|
-
* The
|
|
20
|
-
*
|
|
18
|
+
* The order is paid. A hint: the host's own gate decides access, so send
|
|
19
|
+
* the buyer back to the content it guards.
|
|
21
20
|
*/
|
|
22
|
-
onPaid: (
|
|
21
|
+
onPaid: (order: Order) => void;
|
|
23
22
|
/**
|
|
24
23
|
* Buying needs a signed-in customer: called instead of the checkout when
|
|
25
24
|
* `signedIn` is false or OpenRails answers 401.
|
package/dist/psp.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { PaymentMethod } from './client/types';
|
|
3
|
-
import { PaymentOption, SavedPaymentMethod } from './types';
|
|
4
2
|
export declare const pspConfigSchema: z.ZodObject<{
|
|
5
3
|
psp_id: z.ZodString;
|
|
6
4
|
key: z.ZodString;
|
|
@@ -14,8 +12,6 @@ export declare const pspConfigSchema: z.ZodObject<{
|
|
|
14
12
|
retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
15
13
|
}, z.core.$strip>;
|
|
16
14
|
export type PspConfig = z.infer<typeof pspConfigSchema>;
|
|
17
|
-
/** Whether a rail takes a card in the page (saved or new). */
|
|
18
|
-
export declare const isCardRail: (rail: PaymentOption) => boolean;
|
|
19
15
|
/** PSPs that take new purchases and new cards. */
|
|
20
16
|
export declare const checkoutPsps: (psps: readonly PspConfig[]) => PspConfig[];
|
|
21
17
|
/**
|
|
@@ -23,13 +19,9 @@ export declare const checkoutPsps: (psps: readonly PspConfig[]) => PspConfig[];
|
|
|
23
19
|
* for again; null when none is.
|
|
24
20
|
*/
|
|
25
21
|
export declare function cardRetryAfter(psps: readonly PspConfig[]): number | null;
|
|
26
|
-
/** Saved cards the checkout can charge in place, for the given rails, newest first. */
|
|
27
|
-
export declare function savedMethodsFor(methods: readonly PaymentMethod[], rails: readonly PaymentOption[]): SavedPaymentMethod[];
|
|
28
22
|
export type CardSetupDriver = "collect_js" | "card" | "stripe_elements";
|
|
29
23
|
/** How a card is saved with this PSP in the page, or null when it cannot be. */
|
|
30
24
|
export declare function cardSetupDriver(psp: PspConfig): CardSetupDriver | null;
|
|
31
25
|
export declare const canSavePaymentMethod: (psp: PspConfig) => boolean;
|
|
32
26
|
/** Whether a pending payment on this PSP can be authenticated in the page. */
|
|
33
27
|
export declare const canAuthenticatePayment: (psp: PspConfig) => boolean;
|
|
34
|
-
/** The PSP config behind a checkout rail, for card setup and authentication. */
|
|
35
|
-
export declare function railPsp(rail: PaymentOption): PspConfig;
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, i as r, n as i, o as a, r as o, s, t as c, u as l } from "./hooks-
|
|
1
|
+
import { a as e, c as t, d as n, i as r, n as i, o as a, r as o, s, t as c, u as l } from "./hooks-DYepYVMX.js";
|
|
2
2
|
export { e as BillingProvider, t as useBillingClient, l as useBillingRefresh, a as useConfig, s as useCurrencyScales, n as useOptionalBillingContext, c as usePaymentMethods, i as usePayments, o as useProducts, r as useSubscriptions };
|