@openrails/billing-ui 0.252.1 → 0.254.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 +13 -0
- package/README.md +15 -4
- package/dist/admin/context.d.ts +4 -4
- package/dist/admin/lib/api/endpoints.d.ts +2 -2
- package/dist/admin/lib/api/index.d.ts +1 -1
- package/dist/admin/lib/api/types.d.ts +1 -1
- package/dist/admin/lib/mutations.d.ts +1 -1
- package/dist/admin/messages.d.ts +10 -0
- package/dist/{admin-catalog-Bsxo2gyS.js → admin-catalog-rrFZd5N8.js} +2 -2
- package/dist/{admin-catalog-Bsxo2gyS.js.map → admin-catalog-rrFZd5N8.js.map} +1 -1
- package/dist/{admin-detail-DG-YaHhS.js → admin-detail-DAOjLNL9.js} +2 -2
- package/dist/admin-detail-DAOjLNL9.js.map +1 -0
- package/dist/{admin-orders-8XzHf7b-.js → admin-orders-DMSOum9t.js} +2 -2
- package/dist/admin-orders-DMSOum9t.js.map +1 -0
- package/dist/{admin-price-detail-ByCmrx_W.js → admin-price-detail-Bwk9PXHP.js} +2 -2
- package/dist/{admin-price-detail-ByCmrx_W.js.map → admin-price-detail-Bwk9PXHP.js.map} +1 -1
- package/dist/{admin-price-wizard-m7Qjhq6W.js → admin-price-wizard-ByD7j8mB.js} +2 -2
- package/dist/admin-price-wizard-ByD7j8mB.js.map +1 -0
- package/dist/{admin-settings-BIUgvclv.js → admin-settings-D_8L1Hho.js} +101 -76
- package/dist/admin-settings-D_8L1Hho.js.map +1 -0
- package/dist/admin-utils-DnVY5fYd.js.map +1 -1
- package/dist/admin.js +17 -7
- package/dist/admin.js.map +1 -1
- package/dist/buy-button.d.ts +4 -1
- package/dist/cart.d.ts +4 -1
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +4 -4
- package/dist/client/generated/wire.d.ts +59 -23
- package/dist/client/types.d.ts +13 -7
- package/dist/{client-imFR1UCe.js → client-B301IAQD.js} +6 -5
- package/dist/client-B301IAQD.js.map +1 -0
- package/dist/client.js +1 -1
- package/dist/components/platform-card-form.d.ts +10 -0
- package/dist/create-card-BEILS1VB-DeyyfyFD.js +140 -0
- package/dist/create-card-BEILS1VB-DeyyfyFD.js.map +1 -0
- package/dist/create-card-display-Dv5pcpzc-BWB6vzo2.js +166 -0
- package/dist/create-card-display-Dv5pcpzc-BWB6vzo2.js.map +1 -0
- package/dist/create-copy-button-CAYmfugS-qNapojfj.js +125 -0
- package/dist/create-copy-button-CAYmfugS-qNapojfj.js.map +1 -0
- package/dist/embedded-payment.d.ts +4 -1
- package/dist/fallbacks.d.ts +25 -0
- package/dist/{hooks-C9JkHcRt.js → hooks-DARbMTwv.js} +69 -59
- package/dist/hooks-DARbMTwv.js.map +1 -0
- package/dist/index-rGw83t5v-BE6naeQR.js +1801 -0
- package/dist/index-rGw83t5v-BE6naeQR.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1160 -975
- package/dist/index.js.map +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +1 -0
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +1 -0
- package/dist/locales/zh.js.map +1 -1
- package/dist/order-payment.d.ts +8 -1
- package/dist/product-list.d.ts +4 -1
- package/dist/psp.d.ts +1 -1
- package/dist/react.js +1 -1
- package/package.json +2 -1
- package/dist/admin-detail-DG-YaHhS.js.map +0 -1
- package/dist/admin-orders-8XzHf7b-.js.map +0 -1
- package/dist/admin-price-wizard-m7Qjhq6W.js.map +0 -1
- package/dist/admin-settings-BIUgvclv.js.map +0 -1
- package/dist/client-imFR1UCe.js.map +0 -1
- package/dist/hooks-C9JkHcRt.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Fallbacks are a checkout option
|
|
4
|
+
|
|
5
|
+
- Breaking: OpenRails no longer marks or withholds fallback PSPs
|
|
6
|
+
(`OrderPaymentOption.fallback` and `payment_option_withheld` are gone). Each
|
|
7
|
+
option reports `failed_attempts` on the order.
|
|
8
|
+
- `OrderPayment`, `BuyButton`, `ProductList`, `Cart` and `EmbeddedPayment` take
|
|
9
|
+
`fallbacks`, e.g. `{ ccbill: { for: ["mobius"], afterFailures: 2 } }`: the
|
|
10
|
+
PSP stays hidden until none of its `for` PSPs is offered, or they have failed
|
|
11
|
+
`afterFailures` times on the order, then shows under "Card payment isn't
|
|
12
|
+
working?". `EmbeddedPayment` hands it to the framed pay page in the URL
|
|
13
|
+
fragment (`withPaymentFallbacks`; the page reads it with
|
|
14
|
+
`readPaymentFragment`).
|
|
15
|
+
|
|
3
16
|
## A price's PSPs are one map
|
|
4
17
|
|
|
5
18
|
- Breaking: `CreatePriceParams.psps` and `UpdatePriceParams.psps` map each PSP
|
package/README.md
CHANGED
|
@@ -108,6 +108,19 @@ anything.
|
|
|
108
108
|
`returnUrl` returns the buyer from a redirect step (Stripe's hosted page); it
|
|
109
109
|
must be on one of your app's return origins.
|
|
110
110
|
|
|
111
|
+
`fallbacks` keeps a PSP back until the PSPs it stands in for are not offered,
|
|
112
|
+
or have failed `afterFailures` times on the order combined (each payment
|
|
113
|
+
option reports its `failed_attempts`); it then shows under "Card payment isn't
|
|
114
|
+
working?". CCBill after Mobius declines twice:
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
<ProductList products={products} fallbacks={{ ccbill: { for: ["mobius"], afterFailures: 2 } }} {...handlers} />
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`BuyButton`, `Cart`, `OrderPayment` and `EmbeddedPayment` take it too.
|
|
121
|
+
`EmbeddedPayment` passes it to the framed pay page in the URL fragment
|
|
122
|
+
(`withPaymentFallbacks(payUrl, fallbacks)` does the same for a hosted pay URL).
|
|
123
|
+
|
|
111
124
|
For prepaid credits, a fixed pack is another product/price. A
|
|
112
125
|
`customer_amount` price takes the buyer's `amount`: collect it on your product
|
|
113
126
|
page, and the purchase charges exactly that:
|
|
@@ -144,10 +157,8 @@ customer's browser, which pays it signed in:
|
|
|
144
157
|
```
|
|
145
158
|
|
|
146
159
|
`onSettled` follows a complete order, or one processing on an asynchronous
|
|
147
|
-
rail. A subscription line names its subscription once paid. A
|
|
148
|
-
|
|
149
|
-
offered under "Card payment isn't working?"; a customer back from a PSP's
|
|
150
|
-
page before it reported is offered to continue there.
|
|
160
|
+
rail. A subscription line names its subscription once paid. A customer back
|
|
161
|
+
from a PSP's page before it reported is offered to continue there.
|
|
151
162
|
|
|
152
163
|
## Account billing
|
|
153
164
|
|
package/dist/admin/context.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export declare function createAdminServices(options: AdminClientOptions): {
|
|
|
135
135
|
id: string;
|
|
136
136
|
psp: import('../client/generated/wire').UpdatePSPParams;
|
|
137
137
|
}, unknown>, "mutationKey">;
|
|
138
|
-
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<import('../client/generated/wire').
|
|
138
|
+
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<import('../client/generated/wire').CustomerSettingsResult, Error, {
|
|
139
139
|
customerId: string;
|
|
140
140
|
currency: string;
|
|
141
141
|
amount: string;
|
|
@@ -572,7 +572,7 @@ export declare function createAdminServices(options: AdminClientOptions): {
|
|
|
572
572
|
}, signal?: AbortSignal) => Promise<import('./lib/api/types').PSPRoutingPreview>;
|
|
573
573
|
getConfig: (signal?: AbortSignal) => Promise<import('../client/generated/wire').PublicConfig>;
|
|
574
574
|
getAdminAccess: (signal?: AbortSignal) => Promise<import('../client/generated/wire').AdminAccess>;
|
|
575
|
-
updateCustomer: (customerId: string, params: import('../client/generated/wire').UpdateCustomerParams) => Promise<import('../client/generated/wire').
|
|
575
|
+
updateCustomer: (customerId: string, params: import('../client/generated/wire').UpdateCustomerParams) => Promise<import('../client/generated/wire').CustomerSettingsResult>;
|
|
576
576
|
listWebhooks: (signal?: AbortSignal) => Promise<import('./lib/api/credit-types').ListPage<import('./lib/api/types').AlertWebhook>>;
|
|
577
577
|
createWebhook: (body: import('../client/generated/wire').CreateAlertWebhookParams) => Promise<import('./lib/api/types').AlertWebhook>;
|
|
578
578
|
updateWebhook: (id: string, body: import('../client/generated/wire').UpdateAlertWebhookParams) => Promise<import('./lib/api/types').AlertWebhook>;
|
|
@@ -735,7 +735,7 @@ export declare const useAdminServices: () => {
|
|
|
735
735
|
id: string;
|
|
736
736
|
psp: import('../client/generated/wire').UpdatePSPParams;
|
|
737
737
|
}, unknown>, "mutationKey">;
|
|
738
|
-
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<import('../client/generated/wire').
|
|
738
|
+
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<import('../client/generated/wire').CustomerSettingsResult, Error, {
|
|
739
739
|
customerId: string;
|
|
740
740
|
currency: string;
|
|
741
741
|
amount: string;
|
|
@@ -1172,7 +1172,7 @@ export declare const useAdminServices: () => {
|
|
|
1172
1172
|
}, signal?: AbortSignal) => Promise<import('./lib/api/types').PSPRoutingPreview>;
|
|
1173
1173
|
getConfig: (signal?: AbortSignal) => Promise<import('../client/generated/wire').PublicConfig>;
|
|
1174
1174
|
getAdminAccess: (signal?: AbortSignal) => Promise<import('../client/generated/wire').AdminAccess>;
|
|
1175
|
-
updateCustomer: (customerId: string, params: import('../client/generated/wire').UpdateCustomerParams) => Promise<import('../client/generated/wire').
|
|
1175
|
+
updateCustomer: (customerId: string, params: import('../client/generated/wire').UpdateCustomerParams) => Promise<import('../client/generated/wire').CustomerSettingsResult>;
|
|
1176
1176
|
listWebhooks: (signal?: AbortSignal) => Promise<import('./lib/api/credit-types').ListPage<import('./lib/api/types').AlertWebhook>>;
|
|
1177
1177
|
createWebhook: (body: import('../client/generated/wire').CreateAlertWebhookParams) => Promise<import('./lib/api/types').AlertWebhook>;
|
|
1178
1178
|
updateWebhook: (id: string, body: import('../client/generated/wire').UpdateAlertWebhookParams) => Promise<import('./lib/api/types').AlertWebhook>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdminClient, CursorEnvelope, PageRequest } from './client';
|
|
2
|
-
import { AdminAccess, AlertWebhook, Allowance, CatalogApplicationReceipt, CreateAlertWebhookParams, CreatePSPParams, PSPRefresh, CreatePriceParams, Customer, ListPage, MerchantConfigurationState, Meter, PSP, Payment, PaymentAttempt, PaymentMethod, Price, PriceKeyMovement, Product, PublicConfig, RatePrice, Renewal, UpdateAlertWebhookParams, UpdateCustomerParams, UpdateMerchantConfigurationParams, UpdatePSPParams, UpdatePriceParams, UpdateProductParams } from '../../../client/generated/wire';
|
|
2
|
+
import { AdminAccess, AlertWebhook, Allowance, CatalogApplicationReceipt, CreateAlertWebhookParams, CreatePSPParams, PSPRefresh, CreatePriceParams, Customer, CustomerSettingsResult, ListPage, MerchantConfigurationState, Meter, PSP, Payment, PaymentAttempt, PaymentMethod, Price, PriceKeyMovement, Product, PublicConfig, RatePrice, Renewal, UpdateAlertWebhookParams, UpdateCustomerParams, UpdateMerchantConfigurationParams, UpdatePSPParams, UpdatePriceParams, UpdateProductParams } from '../../../client/generated/wire';
|
|
3
3
|
import { CustomerEntitlement, Finding, PSPRoutingPreview, RawProductAccessGrant, PriceMigration, PriceMigrationCancel, PriceMigrationPreview, ChangeSubscriptionParams, SubscriptionChange, SubscriptionChangePreview } from './types';
|
|
4
4
|
export interface ProductGrant {
|
|
5
5
|
productId: string;
|
|
@@ -125,7 +125,7 @@ export declare function createEndpoints(client: AdminClient): {
|
|
|
125
125
|
}, signal?: AbortSignal) => Promise<PSPRoutingPreview>;
|
|
126
126
|
getConfig: (signal?: AbortSignal) => Promise<PublicConfig>;
|
|
127
127
|
getAdminAccess: (signal?: AbortSignal) => Promise<AdminAccess>;
|
|
128
|
-
updateCustomer: (customerId: string, params: UpdateCustomerParams) => Promise<
|
|
128
|
+
updateCustomer: (customerId: string, params: UpdateCustomerParams) => Promise<CustomerSettingsResult>;
|
|
129
129
|
listWebhooks: (signal?: AbortSignal) => Promise<ListPage<AlertWebhook>>;
|
|
130
130
|
createWebhook: (body: CreateAlertWebhookParams) => Promise<AlertWebhook>;
|
|
131
131
|
updateWebhook: (id: string, body: UpdateAlertWebhookParams) => Promise<AlertWebhook>;
|
|
@@ -80,7 +80,7 @@ export declare function createAdminAPI(client: AdminClient): {
|
|
|
80
80
|
}, signal?: AbortSignal) => Promise<import('./types').PSPRoutingPreview>;
|
|
81
81
|
getConfig: (signal?: AbortSignal) => Promise<import('../../../client/generated/wire').PublicConfig>;
|
|
82
82
|
getAdminAccess: (signal?: AbortSignal) => Promise<import('../../../client/generated/wire').AdminAccess>;
|
|
83
|
-
updateCustomer: (customerId: string, params: import('../../../client/generated/wire').UpdateCustomerParams) => Promise<import('../../../client/generated/wire').
|
|
83
|
+
updateCustomer: (customerId: string, params: import('../../../client/generated/wire').UpdateCustomerParams) => Promise<import('../../../client/generated/wire').CustomerSettingsResult>;
|
|
84
84
|
listWebhooks: (signal?: AbortSignal) => Promise<import('./credit-types').ListPage<import('./types').AlertWebhook>>;
|
|
85
85
|
createWebhook: (body: import('../../../client/generated/wire').CreateAlertWebhookParams) => Promise<import('./types').AlertWebhook>;
|
|
86
86
|
updateWebhook: (id: string, body: import('../../../client/generated/wire').UpdateAlertWebhookParams) => Promise<import('./types').AlertWebhook>;
|
|
@@ -118,5 +118,5 @@ export interface FindingsGauges {
|
|
|
118
118
|
freeloaders: number;
|
|
119
119
|
duplicate_coverage: number;
|
|
120
120
|
}
|
|
121
|
-
export type { AlertWebhook, MerchantConfigurationState,
|
|
121
|
+
export type { AlertWebhook, MerchantConfigurationState, PSP, RailDefinition, } from '../../../client/generated/wire';
|
|
122
122
|
export type AlertSeverity = "warning" | "critical";
|
|
@@ -102,7 +102,7 @@ export declare function createMutations(client: AdminClient, api: AdminAPI, quer
|
|
|
102
102
|
id: string;
|
|
103
103
|
psp: UpdatePSPParams;
|
|
104
104
|
}, unknown>, "mutationKey">;
|
|
105
|
-
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<
|
|
105
|
+
setCreditLimit: () => import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<import('../../client/generated/wire').CustomerSettingsResult, Error, {
|
|
106
106
|
customerId: string;
|
|
107
107
|
currency: string;
|
|
108
108
|
amount: string;
|
package/dist/admin/messages.d.ts
CHANGED
|
@@ -437,6 +437,16 @@ export declare const billingAdminMessages: {
|
|
|
437
437
|
readonly "Live: real money": "Live: real money";
|
|
438
438
|
readonly "Test: the provider's own system, no money moves": "Test: the provider's own system, no money moves";
|
|
439
439
|
readonly "Sandbox: the provider's separate sandbox": "Sandbox: the provider's separate sandbox";
|
|
440
|
+
readonly "Mainnet: real money": "Mainnet: real money";
|
|
441
|
+
readonly "Devnet: Solana's development network": "Devnet: Solana's development network";
|
|
442
|
+
readonly "Testnet: Solana's test network": "Testnet: Solana's test network";
|
|
443
|
+
readonly Treasury: "Treasury";
|
|
444
|
+
readonly "Gateway ID": "Gateway ID";
|
|
445
|
+
readonly "Client account number": "Client account number";
|
|
446
|
+
readonly "Client subaccount": "Client subaccount";
|
|
447
|
+
readonly Money: "Money";
|
|
448
|
+
readonly "Sandbox: its PSPs move no money": "Sandbox: its PSPs move no money";
|
|
449
|
+
readonly "Live: its PSPs move real money": "Live: its PSPs move real money";
|
|
440
450
|
readonly "Pick a stored payment method": "Pick a stored payment method";
|
|
441
451
|
readonly "Pinned to an archived (prior) version": "Pinned to an archived (prior) version";
|
|
442
452
|
readonly "Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.": "Points future renewals of this subscription at another of the customer's stored cards (same rail), or back at their default card for its currency.";
|
|
@@ -18,7 +18,7 @@ import { n as re, r as ie } from "./admin-dialog-width-BPrgdYlj.js";
|
|
|
18
18
|
import { i as V, n as ae, r as oe, t as se } from "./admin-price-format-DM1qORWI.js";
|
|
19
19
|
import { t as ce } from "./admin-textarea-DK1Fq31x.js";
|
|
20
20
|
import { r as le, t as ue } from "./admin-card-DGbi6ZHZ.js";
|
|
21
|
-
import { t as de } from "./admin-price-wizard-
|
|
21
|
+
import { t as de } from "./admin-price-wizard-ByD7j8mB.js";
|
|
22
22
|
import * as H from "react";
|
|
23
23
|
import { useMutation as U, useQuery as W, useQueryClient as G } from "@tanstack/react-query";
|
|
24
24
|
import { Fragment as fe, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
@@ -1196,4 +1196,4 @@ function $({ label: t, id: n, hint: r, children: i }) {
|
|
|
1196
1196
|
//#endregion
|
|
1197
1197
|
export { ke as CatalogDriftPage, Oe as CatalogPricesPage, De as CatalogProductsPage };
|
|
1198
1198
|
|
|
1199
|
-
//# sourceMappingURL=admin-catalog-
|
|
1199
|
+
//# sourceMappingURL=admin-catalog-rrFZd5N8.js.map
|