@openrails/billing-ui 0.249.0 → 0.250.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 +17 -0
- package/README.md +13 -13
- package/dist/account/account-billing.d.ts +2 -2
- package/dist/account/cancel-dialog.d.ts +2 -2
- package/dist/account/change-card-dialog.d.ts +2 -2
- package/dist/account/payment-history.d.ts +2 -2
- package/dist/account/payment-methods-panel.d.ts +2 -2
- package/dist/account/section.d.ts +2 -2
- package/dist/account/subscriptions-panel.d.ts +2 -2
- package/dist/admin/context.d.ts +2 -2
- package/dist/admin/lib/queries.d.ts +1 -1
- package/dist/admin/messages.d.ts +3 -3
- package/dist/admin/pages/catalog/psp-links.d.ts +1 -1
- package/dist/admin/theme.d.ts +2 -2
- package/dist/admin/types.d.ts +2 -2
- package/dist/{admin-attempts-lAoW-Urd.js → admin-attempts-DxRHTODq.js} +8 -8
- package/dist/{admin-attempts-lAoW-Urd.js.map → admin-attempts-DxRHTODq.js.map} +1 -1
- package/dist/{admin-auth-DQGHtt0j.js → admin-auth-CiuZ-Hlm.js} +2 -2
- package/dist/{admin-auth-DQGHtt0j.js.map → admin-auth-CiuZ-Hlm.js.map} +1 -1
- package/dist/{admin-badge-DR5-1qd8.js → admin-badge-VCGbnfiN.js} +2 -2
- package/dist/{admin-badge-DR5-1qd8.js.map → admin-badge-VCGbnfiN.js.map} +1 -1
- package/dist/{admin-button-CTL3DgOt.js → admin-button-Oip73Plq.js} +2 -2
- package/dist/{admin-button-CTL3DgOt.js.map → admin-button-Oip73Plq.js.map} +1 -1
- package/dist/{admin-capabilities-BuigAgtm.js → admin-capabilities-BGv7oG8v.js} +2 -2
- package/dist/{admin-capabilities-BuigAgtm.js.map → admin-capabilities-BGv7oG8v.js.map} +1 -1
- package/dist/{admin-card-bzAks3-3.js → admin-card-DGbi6ZHZ.js} +2 -2
- package/dist/{admin-card-bzAks3-3.js.map → admin-card-DGbi6ZHZ.js.map} +1 -1
- package/dist/{admin-catalog-CK6CM9I2.js → admin-catalog-3pPEAuDY.js} +19 -19
- package/dist/{admin-catalog-CK6CM9I2.js.map → admin-catalog-3pPEAuDY.js.map} +1 -1
- package/dist/{admin-customers-D8u5gq3M.js → admin-customers-cnKMEV4q.js} +6 -6
- package/dist/{admin-customers-D8u5gq3M.js.map → admin-customers-cnKMEV4q.js.map} +1 -1
- package/dist/{admin-dashboard-DqqFjOzq.js → admin-dashboard-DfSsUyo-.js} +14 -14
- package/dist/{admin-dashboard-DqqFjOzq.js.map → admin-dashboard-DfSsUyo-.js.map} +1 -1
- package/dist/{admin-data-table-qfXLOFmN.js → admin-data-table-CgeWv__T.js} +6 -6
- package/dist/{admin-data-table-qfXLOFmN.js.map → admin-data-table-CgeWv__T.js.map} +1 -1
- package/dist/{admin-detail-X82kR2f7.js → admin-detail-BATuJjVs.js} +12 -12
- package/dist/{admin-detail-X82kR2f7.js.map → admin-detail-BATuJjVs.js.map} +1 -1
- package/dist/{admin-detail-DUAJQg8G.js → admin-detail-Cq59e14B.js} +15 -15
- package/dist/{admin-detail-DUAJQg8G.js.map → admin-detail-Cq59e14B.js.map} +1 -1
- package/dist/{admin-detail-BHe51ma9.js → admin-detail-DG-YaHhS.js} +11 -11
- package/dist/{admin-detail-BHe51ma9.js.map → admin-detail-DG-YaHhS.js.map} +1 -1
- package/dist/{admin-detail-CGOyqs7s.js → admin-detail-Dc7rU4mM.js} +15 -15
- package/dist/{admin-detail-CGOyqs7s.js.map → admin-detail-Dc7rU4mM.js.map} +1 -1
- package/dist/{admin-dialog-BjuKI5Hp.js → admin-dialog-Ffx95AIT.js} +3 -3
- package/dist/{admin-dialog-BjuKI5Hp.js.map → admin-dialog-Ffx95AIT.js.map} +1 -1
- package/dist/{admin-dom-uMmZzRvU.js → admin-dom-lnNSQ7ke.js} +4 -4
- package/dist/{admin-dom-uMmZzRvU.js.map → admin-dom-lnNSQ7ke.js.map} +1 -1
- package/dist/{admin-dropdown-menu-BW1D_h6s.js → admin-dropdown-menu-CCiW4-oz.js} +2 -2
- package/dist/{admin-dropdown-menu-BW1D_h6s.js.map → admin-dropdown-menu-CCiW4-oz.js.map} +1 -1
- package/dist/{admin-fact-card-DO_fHosg.js → admin-fact-card-D6mZgxpN.js} +2 -2
- package/dist/{admin-fact-card-DO_fHosg.js.map → admin-fact-card-D6mZgxpN.js.map} +1 -1
- package/dist/{admin-health-B4jN2LwR.js → admin-health-CvJX9prw.js} +13 -13
- package/dist/{admin-health-B4jN2LwR.js.map → admin-health-CvJX9prw.js.map} +1 -1
- package/dist/{admin-input-CcfQfJFN.js → admin-input-DO5lvCLL.js} +2 -2
- package/dist/{admin-input-CcfQfJFN.js.map → admin-input-DO5lvCLL.js.map} +1 -1
- package/dist/{admin-label-BiEN5cjb.js → admin-label-BzJpr3lg.js} +2 -2
- package/dist/{admin-label-BiEN5cjb.js.map → admin-label-BzJpr3lg.js.map} +1 -1
- package/dist/{admin-linked-table-row-BsaUruCN.js → admin-linked-table-row-5vFb6rXY.js} +4 -4
- package/dist/{admin-linked-table-row-BsaUruCN.js.map → admin-linked-table-row-5vFb6rXY.js.map} +1 -1
- package/dist/{admin-metering-COFcSPQy.js → admin-metering-BksTFRRP.js} +14 -14
- package/dist/{admin-metering-COFcSPQy.js.map → admin-metering-BksTFRRP.js.map} +1 -1
- package/dist/{admin-ops-B3mcr76u.js → admin-ops-Ch2-BmUp.js} +11 -11
- package/dist/{admin-ops-B3mcr76u.js.map → admin-ops-Ch2-BmUp.js.map} +1 -1
- package/dist/{admin-orders-dxC99Idl.js → admin-orders-8XzHf7b-.js} +8 -8
- package/dist/{admin-orders-dxC99Idl.js.map → admin-orders-8XzHf7b-.js.map} +1 -1
- package/dist/{admin-payments-Bs7HSfP0.js → admin-payments-pNLNIU0X.js} +9 -9
- package/dist/{admin-payments-Bs7HSfP0.js.map → admin-payments-pNLNIU0X.js.map} +1 -1
- package/dist/{admin-price-detail-DRquxpA9.js → admin-price-detail-BeGDPxKX.js} +11 -11
- package/dist/admin-price-detail-BeGDPxKX.js.map +1 -0
- package/dist/{admin-price-wizard-CI7K-2Nz.js → admin-price-wizard-ferZSTfO.js} +7 -7
- package/dist/{admin-price-wizard-CI7K-2Nz.js.map → admin-price-wizard-ferZSTfO.js.map} +1 -1
- package/dist/{admin-range-picker-Dr2M1EZr.js → admin-range-picker-DaIvC1oC.js} +5 -5
- package/dist/{admin-range-picker-Dr2M1EZr.js.map → admin-range-picker-DaIvC1oC.js.map} +1 -1
- package/dist/{admin-reports-CywKLiSA.js → admin-reports-CA-cnNur.js} +8 -8
- package/dist/{admin-reports-CywKLiSA.js.map → admin-reports-CA-cnNur.js.map} +1 -1
- package/dist/{admin-select-DBgprVW6.js → admin-select-CUXvh6j1.js} +2 -2
- package/dist/{admin-select-DBgprVW6.js.map → admin-select-CUXvh6j1.js.map} +1 -1
- package/dist/{admin-settings-Bmoy95uO.js → admin-settings-C6eWFkDn.js} +16 -16
- package/dist/{admin-settings-Bmoy95uO.js.map → admin-settings-C6eWFkDn.js.map} +1 -1
- package/dist/{admin-skeleton-DsM7crYi.js → admin-skeleton-DEY3Q8Dg.js} +2 -2
- package/dist/{admin-skeleton-DsM7crYi.js.map → admin-skeleton-DEY3Q8Dg.js.map} +1 -1
- package/dist/{admin-status-badge-BFPgo71d.js → admin-status-badge-CwqIU8tK.js} +2 -2
- package/dist/{admin-status-badge-BFPgo71d.js.map → admin-status-badge-CwqIU8tK.js.map} +1 -1
- package/dist/{admin-subscriptions-CLYc_HEV.js → admin-subscriptions-lJG_EzMe.js} +9 -9
- package/dist/{admin-subscriptions-CLYc_HEV.js.map → admin-subscriptions-lJG_EzMe.js.map} +1 -1
- package/dist/{admin-switch-BJUxLCsa.js → admin-switch-S4g_ppaU.js} +2 -2
- package/dist/{admin-switch-BJUxLCsa.js.map → admin-switch-S4g_ppaU.js.map} +1 -1
- package/dist/{admin-table-CH9TrXJf.js → admin-table-CWhiCb9d.js} +2 -2
- package/dist/{admin-table-CH9TrXJf.js.map → admin-table-CWhiCb9d.js.map} +1 -1
- package/dist/{admin-tabs-528FJMjt.js → admin-tabs-Cjm5a6UJ.js} +2 -2
- package/dist/{admin-tabs-528FJMjt.js.map → admin-tabs-Cjm5a6UJ.js.map} +1 -1
- package/dist/{admin-textarea-DEz38RaI.js → admin-textarea-DK1Fq31x.js} +2 -2
- package/dist/{admin-textarea-DEz38RaI.js.map → admin-textarea-DK1Fq31x.js.map} +1 -1
- package/dist/{admin-typed-confirm-dialog-DU7m9-O7.js → admin-typed-confirm-dialog-BloZvFPA.js} +6 -6
- package/dist/{admin-typed-confirm-dialog-DU7m9-O7.js.map → admin-typed-confirm-dialog-BloZvFPA.js.map} +1 -1
- package/dist/{admin-utils-BK4Vh1o_.js → admin-utils-DnVY5fYd.js} +3 -3
- package/dist/admin-utils-DnVY5fYd.js.map +1 -0
- package/dist/{admin-widget-viz-Da48c-Zf.js → admin-widget-viz-RCkxUspL.js} +8 -8
- package/dist/{admin-widget-viz-Da48c-Zf.js.map → admin-widget-viz-RCkxUspL.js.map} +1 -1
- package/dist/admin.js +31 -31
- package/dist/admin.js.map +1 -1
- package/dist/appearance.d.ts +7 -7
- package/dist/buy-button.d.ts +3 -3
- package/dist/cart.d.ts +4 -4
- package/dist/client/client.d.ts +4 -4
- 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 +37 -40
- package/dist/client/types.d.ts +12 -17
- package/dist/{client-rFrCMrkn.js → client-HWr09qpX.js} +11 -13
- package/dist/client-HWr09qpX.js.map +1 -0
- package/dist/client.js +1 -1
- package/dist/embedded-payment.d.ts +25 -0
- package/dist/{hooks-B1TffejB.js → hooks-D9MR20BY.js} +2 -2
- package/dist/hooks-D9MR20BY.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +69 -69
- package/dist/index.js.map +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +1 -1
- package/dist/locales/en.js +1 -1
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +1 -1
- package/dist/locales/zh.js.map +1 -1
- package/dist/modal.d.ts +8 -8
- package/dist/{order-checkout.d.ts → order-payment.d.ts} +4 -4
- package/dist/product-list.d.ts +3 -3
- package/dist/psp.d.ts +2 -2
- package/dist/react/provider.d.ts +3 -3
- package/dist/react.js +1 -1
- package/dist/save-payment-method.d.ts +2 -2
- package/dist/scope-context.d.ts +4 -4
- package/dist/scope.d.ts +2 -2
- package/dist/tokenized-card-form.d.ts +2 -2
- package/docs/payment-form-contract.md +3 -3
- package/package.json +2 -2
- package/dist/admin-price-detail-DRquxpA9.js.map +0 -1
- package/dist/admin-utils-BK4Vh1o_.js.map +0 -1
- package/dist/client-rFrCMrkn.js.map +0 -1
- package/dist/embedded-checkout.d.ts +0 -25
- package/dist/hooks-B1TffejB.js.map +0 -1
package/dist/appearance.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
export type
|
|
3
|
-
export interface
|
|
2
|
+
export type BillingTheme = "light" | "dark" | "auto" | "inherit";
|
|
3
|
+
export interface BillingVariables {
|
|
4
4
|
background?: string;
|
|
5
5
|
foreground?: string;
|
|
6
6
|
card?: string;
|
|
@@ -15,9 +15,9 @@ export interface CheckoutVariables {
|
|
|
15
15
|
radius?: string;
|
|
16
16
|
fontFamily?: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
19
|
-
theme?:
|
|
20
|
-
variables?:
|
|
18
|
+
export interface BillingAppearance {
|
|
19
|
+
theme?: BillingTheme;
|
|
20
|
+
variables?: BillingVariables;
|
|
21
21
|
}
|
|
22
|
-
export declare function appearanceStyle(appearance:
|
|
23
|
-
export declare function appearanceTheme(appearance:
|
|
22
|
+
export declare function appearanceStyle(appearance: BillingAppearance | undefined, namespace?: "orck" | "orba"): CSSProperties | undefined;
|
|
23
|
+
export declare function appearanceTheme(appearance: BillingAppearance | undefined): BillingTheme;
|
package/dist/buy-button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BillingAppearance } from './appearance';
|
|
2
2
|
import { Order, Price } from './client/types';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export interface BuyButtonProps {
|
|
@@ -23,13 +23,13 @@ export interface BuyButtonProps {
|
|
|
23
23
|
*/
|
|
24
24
|
onPaid: (order: Order) => void;
|
|
25
25
|
/**
|
|
26
|
-
* Buying needs a signed-in customer: called instead of
|
|
26
|
+
* Buying needs a signed-in customer: called instead of paying when
|
|
27
27
|
* `signedIn` is false or OpenRails answers 401.
|
|
28
28
|
*/
|
|
29
29
|
onSignInRequired: () => void;
|
|
30
30
|
/** false when the host knows the visitor is signed out. */
|
|
31
31
|
signedIn?: boolean;
|
|
32
|
-
appearance?:
|
|
32
|
+
appearance?: BillingAppearance;
|
|
33
33
|
className?: string;
|
|
34
34
|
}
|
|
35
35
|
/** One price's button and its order. Requires `BillingProvider`. */
|
package/dist/cart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BillingAppearance } from './appearance';
|
|
2
2
|
import { BillingClient } from './client/client';
|
|
3
3
|
import { Order } from './client/types';
|
|
4
4
|
import * as React from "react";
|
|
@@ -6,12 +6,12 @@ export interface CartProps {
|
|
|
6
6
|
/** The client to read and buy through; default: the provider's. */
|
|
7
7
|
client?: BillingClient;
|
|
8
8
|
/**
|
|
9
|
-
* The order made from the cart. Default: pay it here with
|
|
9
|
+
* The order made from the cart. Default: pay it here with OrderPayment.
|
|
10
10
|
*/
|
|
11
11
|
onOrder?: (order: Order) => void;
|
|
12
|
-
/** Passed to
|
|
12
|
+
/** Passed to OrderPayment: the order is complete, or processing. */
|
|
13
13
|
onSettled?: (order: Order) => void;
|
|
14
|
-
appearance?:
|
|
14
|
+
appearance?: BillingAppearance;
|
|
15
15
|
className?: string;
|
|
16
16
|
}
|
|
17
17
|
/** The customer's cart. Requires `BillingProvider`. */
|
package/dist/client/client.d.ts
CHANGED
|
@@ -156,9 +156,9 @@ export declare function createBillingClient(options?: BillingClientOptions): {
|
|
|
156
156
|
* customer saw; `idempotencyKey`, required with `payment`, names the
|
|
157
157
|
* payment attempt. A failed payment resolves as payOrder's does. Without
|
|
158
158
|
* `payment` the customer's open order of the same lines is answered when
|
|
159
|
-
* there is one. With `
|
|
160
|
-
* `order.
|
|
161
|
-
*
|
|
159
|
+
* there is one. With `payUrl` the order answers its embedded pay URL,
|
|
160
|
+
* `order.pay_url` on the payment origin, for `<EmbeddedPayment>`, fresh
|
|
161
|
+
* on every answer: the merchant's own signed-in person only.
|
|
162
162
|
*/
|
|
163
163
|
createOrder(input: {
|
|
164
164
|
lines?: {
|
|
@@ -170,7 +170,7 @@ export declare function createBillingClient(options?: BillingClientOptions): {
|
|
|
170
170
|
expectedTotal?: string;
|
|
171
171
|
payment?: OrderPaymentInput;
|
|
172
172
|
reusable?: boolean;
|
|
173
|
-
|
|
173
|
+
payUrl?: wire.MyOrderPayURLParams;
|
|
174
174
|
idempotencyKey?: string;
|
|
175
175
|
}): Promise<OrderResult>;
|
|
176
176
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type OpenRailsErrorCode = "admission_captured" | "admission_not_found" | "already_owned" | "application_required" | "as_of_required" | "authentication_required" | "authentication_unavailable" | "authorization_unavailable" | "billing_archive_integrity" | "billing_archive_invalid_artifact" | "billing_archive_merchant_mismatch" | "billing_archive_not_empty" | "billing_archive_platform_cards" | "billing_archive_unavailable" | "billing_archive_unsupported_state" | "billing_policy_not_found" | "cancel_unsupported_on_rail" | "captcha_invalid" | "captcha_required" | "card_attempts_blocked" | "card_custody_reserved" | "card_declined" | "card_not_saved" | "card_requires_https" | "catalog_benefit_overlap" | "catalog_revision_conflict" | "
|
|
1
|
+
export type OpenRailsErrorCode = "admission_captured" | "admission_not_found" | "already_owned" | "application_required" | "as_of_required" | "authentication_required" | "authentication_unavailable" | "authorization_unavailable" | "billing_archive_integrity" | "billing_archive_invalid_artifact" | "billing_archive_merchant_mismatch" | "billing_archive_not_empty" | "billing_archive_platform_cards" | "billing_archive_unavailable" | "billing_archive_unsupported_state" | "billing_policy_not_found" | "cancel_unsupported_on_rail" | "captcha_invalid" | "captcha_required" | "card_attempts_blocked" | "card_custody_reserved" | "card_declined" | "card_not_saved" | "card_requires_https" | "catalog_benefit_overlap" | "catalog_revision_conflict" | "credential_expired" | "credential_revoked" | "credit_grant_held" | "credit_grant_not_found" | "credit_grant_unavailable" | "csrf_origin_denied" | "currency_unsupported" | "custodian_capture_unavailable" | "customer_action_required" | "customer_email_required" | "customer_issuer_mismatch" | "customer_not_found" | "customer_payment_unsupported" | "customer_session_required" | "dashboard_invalid" | "database_busy" | "default_payment_method_invalid" | "default_payment_method_required" | "default_rate_card_not_found" | "destructive_actions_held" | "embed_origins_required" | "entitlement_required" | "finding_action_failed" | "finding_not_actionable" | "finding_requires_merchant_config" | "hold_not_found" | "host_event_not_found" | "host_principal_invalid" | "idempotency_key_in_use" | "idempotency_key_required" | "idempotency_key_reused" | "insufficient_credits" | "insufficient_funds" | "internal_error" | "invalid_cursor" | "invalid_customer_id" | "invalid_host_event_request" | "invalid_param" | "invalid_payment_method" | "invalid_psp_reference" | "invalid_query" | "invalid_request_body" | "invalid_settlement_status_request" | "invoker_scoped_principal" | "merchant_config_read_only" | "merchant_mismatch" | "merchant_unresolved" | "meter_in_use" | "meter_rate_card_conflict" | "method_not_allowed" | "metrics_query_invalid" | "model_unavailable" | "network_account_linked" | "network_link_challenge_invalid" | "network_link_conflict" | "network_link_in_use" | "network_terms_required" | "order_action_not_allowed" | "order_attempt_closed" | "order_attempt_expired" | "order_has_recurring_line" | "order_line_unavailable" | "order_not_cancelable" | "order_not_payable" | "order_payment_in_progress" | "order_total_changed" | "pay_url_attempts_exhausted" | "pay_url_expired" | "pay_url_not_found" | "pay_url_unavailable" | "payment_duplicate_refused" | "payment_exceeds_due" | "payment_failed" | "payment_idempotency_conflict" | "payment_in_progress" | "payment_method_delete_failed" | "payment_method_delete_unsupported" | "payment_method_not_psp_vaulted" | "payment_method_not_usable" | "payment_method_psp_mismatch" | "payment_method_required" | "payment_method_same_vault" | "payment_method_stale" | "payment_method_update_failed" | "payment_method_update_unsupported" | "payment_not_found" | "payment_not_refundable" | "payment_not_retryable" | "payment_option_unavailable" | "payment_provider_rejected" | "permission_required" | "platform_vault_unavailable" | "platform_vault_unreachable" | "price_change_currency_mismatch" | "price_change_target_archived" | "price_increase_notice_too_short" | "price_key_cadence_conflict" | "price_key_not_found" | "price_migration_not_found" | "price_not_found" | "price_not_sellable" | "product_in_use" | "product_not_found" | "product_tier_group_conflict" | "product_tier_group_in_use" | "provider_cancel_held" | "provider_outcome_unknown" | "provider_writes_held" | "psp_claim_requires_proof" | "psp_credentials_rejected" | "psp_exists" | "psp_key_taken" | "psp_last_active" | "psp_not_found" | "purchase_review_resolved" | "quantity_not_allowed" | "rate_card_product_not_found" | "rate_limit_exceeded" | "rebill_terms_committed" | "refund_failed" | "refund_rail_unavailable" | "refund_unsupported" | "request_body_too_large" | "resource_access_denied" | "resource_conflict" | "resource_not_found" | "revision_mismatch" | "route_not_found" | "running_charge_not_found" | "scheduled_change_exists" | "service_credential_customer_scope_denied" | "service_unavailable" | "solana_rpc_unavailable" | "solana_transaction_refused" | "step_up_required" | "step_up_unavailable" | "stored_credential_required" | "subscription_change_already_scheduled" | "subscription_change_cadence_unsupported" | "subscription_change_credit_exceeds_price" | "subscription_change_cycle_unknown" | "subscription_change_idempotency_conflict" | "subscription_change_idempotency_key_required" | "subscription_change_in_flight" | "subscription_change_period_unknown" | "subscription_change_provider_conflict" | "subscription_change_refused" | "subscription_change_renewal_due" | "subscription_change_requires_linked_plan" | "subscription_change_target_inactive" | "subscription_change_unsupported_on_rail" | "subscription_not_active" | "subscription_not_found" | "subscription_paid_through" | "subscription_resumable" | "trial_unsupported_on_rail" | "unknown_field" | "unsupported_media_type" | "usage_meter_invalid" | "usage_meter_not_found" | "usage_not_priced" | "usage_rate_card_invalid" | "webhook_account_mismatch" | "webhook_invalid";
|
|
2
2
|
export type OpenRailsErrorType = "api_error" | "authentication_error" | "authorization_error" | "card_error" | "invalid_request_error" | "rate_limit_error";
|
|
3
3
|
export declare const OPENRAILS_ERROR_CODES: Readonly<Record<OpenRailsErrorCode, {
|
|
4
4
|
status: number;
|
|
@@ -98,7 +98,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
98
98
|
readonly 200: "Order";
|
|
99
99
|
readonly 201: "Order";
|
|
100
100
|
};
|
|
101
|
-
readonly errors: readonly ["already_owned", "card_attempts_blocked", "card_declined", "
|
|
101
|
+
readonly errors: readonly ["already_owned", "card_attempts_blocked", "card_declined", "customer_action_required", "customer_session_required", "embed_origins_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_line_unavailable", "order_not_payable", "order_payment_in_progress", "order_total_changed", "pay_url_unavailable", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_provider_rejected", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
102
102
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
103
103
|
}, {
|
|
104
104
|
readonly method: "GET";
|
|
@@ -173,7 +173,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
173
173
|
}, {
|
|
174
174
|
readonly method: "GET";
|
|
175
175
|
readonly path: "/v1/orders/{id}/solana-pay";
|
|
176
|
-
readonly group: "
|
|
176
|
+
readonly group: "payment";
|
|
177
177
|
readonly auth: "public";
|
|
178
178
|
readonly permission: null;
|
|
179
179
|
readonly sensitive: false;
|
|
@@ -187,7 +187,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
187
187
|
}, {
|
|
188
188
|
readonly method: "POST";
|
|
189
189
|
readonly path: "/v1/orders/{id}/solana-pay";
|
|
190
|
-
readonly group: "
|
|
190
|
+
readonly group: "payment";
|
|
191
191
|
readonly auth: "public";
|
|
192
192
|
readonly permission: null;
|
|
193
193
|
readonly sensitive: false;
|
|
@@ -231,7 +231,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
231
231
|
readonly 200: "Order";
|
|
232
232
|
readonly 201: "Order";
|
|
233
233
|
};
|
|
234
|
-
readonly errors: readonly ["already_owned", "
|
|
234
|
+
readonly errors: readonly ["already_owned", "embed_origins_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_line_unavailable", "quantity_not_allowed", "resource_not_found", "service_unavailable"];
|
|
235
235
|
readonly errorSets: readonly ["tier:application", "request"];
|
|
236
236
|
}, {
|
|
237
237
|
readonly method: "POST";
|
|
@@ -408,17 +408,6 @@ export type CheckEntitlementsParams = {
|
|
|
408
408
|
prefix_limit?: number;
|
|
409
409
|
at?: string;
|
|
410
410
|
};
|
|
411
|
-
export type CheckoutRoutingMatch = {
|
|
412
|
-
currency?: string;
|
|
413
|
-
product?: string;
|
|
414
|
-
price?: string;
|
|
415
|
-
mode?: string;
|
|
416
|
-
country?: string;
|
|
417
|
-
};
|
|
418
|
-
export type CheckoutRoutingRule = {
|
|
419
|
-
match?: CheckoutRoutingMatch;
|
|
420
|
-
prefer: string[];
|
|
421
|
-
};
|
|
422
411
|
export type ClearDestructiveHoldParams = {
|
|
423
412
|
reason?: string;
|
|
424
413
|
};
|
|
@@ -456,7 +445,7 @@ export type CreateMyOrderParams = {
|
|
|
456
445
|
expected_total?: string;
|
|
457
446
|
payment?: OrderPaymentParams;
|
|
458
447
|
reusable?: boolean;
|
|
459
|
-
|
|
448
|
+
pay_url?: MyOrderPayURLParams;
|
|
460
449
|
};
|
|
461
450
|
export type CreateNetworkLinkParams = {
|
|
462
451
|
challenge_id?: string;
|
|
@@ -466,7 +455,7 @@ export type CreateOrderParams = {
|
|
|
466
455
|
customer_id?: string;
|
|
467
456
|
lines?: OrderLineParams[];
|
|
468
457
|
expires_at?: string;
|
|
469
|
-
|
|
458
|
+
pay_url?: OrderPayURLParams;
|
|
470
459
|
};
|
|
471
460
|
export type CreatePSPParams = {
|
|
472
461
|
key?: string;
|
|
@@ -641,7 +630,7 @@ export type CustomerLink = {
|
|
|
641
630
|
merchant_id: string;
|
|
642
631
|
customer_id: string;
|
|
643
632
|
account_id: string;
|
|
644
|
-
method: "
|
|
633
|
+
method: "connect" | "payment_page" | "sign_in";
|
|
645
634
|
status: "active" | "revoked";
|
|
646
635
|
linked_at: string;
|
|
647
636
|
revoked_at: string | null;
|
|
@@ -650,12 +639,12 @@ export type CustomerLink = {
|
|
|
650
639
|
export type CustomerNetwork = {
|
|
651
640
|
account_id: string;
|
|
652
641
|
linked_at: string;
|
|
653
|
-
method: "
|
|
642
|
+
method: "connect" | "payment_page" | "sign_in";
|
|
654
643
|
};
|
|
655
644
|
export type CustomerNetworkHostEvent = {
|
|
656
645
|
customer_id: string;
|
|
657
646
|
account_id: string;
|
|
658
|
-
method: "
|
|
647
|
+
method: "connect" | "payment_page" | "sign_in" | null;
|
|
659
648
|
revoked_by: "account_deleted" | "customer" | "merchant_left" | null;
|
|
660
649
|
};
|
|
661
650
|
export type CustomerSettings = {
|
|
@@ -1029,15 +1018,15 @@ export type MatrixCell = {
|
|
|
1029
1018
|
unit_amount: string;
|
|
1030
1019
|
maximum_amount?: string;
|
|
1031
1020
|
};
|
|
1032
|
-
export type MerchantCheckoutSettings = {
|
|
1033
|
-
embed_origins?: string[];
|
|
1034
|
-
};
|
|
1035
1021
|
export type MerchantConfigurationState = {
|
|
1036
1022
|
revision: number;
|
|
1037
1023
|
display_name: string;
|
|
1038
1024
|
settings: MerchantSettings;
|
|
1039
1025
|
platform_vault: PlatformVaultState;
|
|
1040
1026
|
};
|
|
1027
|
+
export type MerchantPaymentPageSettings = {
|
|
1028
|
+
embed_origins?: string[];
|
|
1029
|
+
};
|
|
1041
1030
|
export type MerchantProfile = {
|
|
1042
1031
|
logo_url?: string;
|
|
1043
1032
|
from_email?: string;
|
|
@@ -1055,9 +1044,9 @@ export type MerchantSettings = {
|
|
|
1055
1044
|
provider_refund_access?: string;
|
|
1056
1045
|
arrears_grace_days?: number;
|
|
1057
1046
|
arrears_delinquency_floor?: string;
|
|
1058
|
-
|
|
1047
|
+
psp_routing?: PSPRoutingRule[];
|
|
1059
1048
|
dunning_policy?: DunningPolicy;
|
|
1060
|
-
|
|
1049
|
+
payment_page?: MerchantPaymentPageSettings;
|
|
1061
1050
|
balance_notices?: BalanceNoticeSettings;
|
|
1062
1051
|
card_custody?: "hosted" | "merchant" | "platform";
|
|
1063
1052
|
billing_policies?: BillingPolicy[];
|
|
@@ -1163,8 +1152,8 @@ export type MetricsSchema = {
|
|
|
1163
1152
|
limits: MetricsLimits;
|
|
1164
1153
|
query_shape: string;
|
|
1165
1154
|
};
|
|
1166
|
-
export type
|
|
1167
|
-
|
|
1155
|
+
export type MyOrderPayURLParams = {
|
|
1156
|
+
embedded?: boolean;
|
|
1168
1157
|
};
|
|
1169
1158
|
export type NetworkLink = {
|
|
1170
1159
|
link: CustomerLink;
|
|
@@ -1224,7 +1213,12 @@ export type Order = {
|
|
|
1224
1213
|
lines: OrderLine[];
|
|
1225
1214
|
payment: OrderPayment;
|
|
1226
1215
|
payment_options: OrderPaymentOption[];
|
|
1227
|
-
|
|
1216
|
+
pay_url: string | null;
|
|
1217
|
+
pay_url_expires_at: string | null;
|
|
1218
|
+
embedded: boolean;
|
|
1219
|
+
success_url: string | null;
|
|
1220
|
+
cancel_url: string | null;
|
|
1221
|
+
saved_payment_methods: boolean;
|
|
1228
1222
|
renewal: OrderRenewal | null;
|
|
1229
1223
|
usage: OrderUsage | null;
|
|
1230
1224
|
expires_at: string | null;
|
|
@@ -1235,21 +1229,6 @@ export type Order = {
|
|
|
1235
1229
|
uncollectible_at: string | null;
|
|
1236
1230
|
created_at: string;
|
|
1237
1231
|
};
|
|
1238
|
-
export type OrderCheckout = {
|
|
1239
|
-
url: string | null;
|
|
1240
|
-
ui_mode: "embedded" | "hosted";
|
|
1241
|
-
expires_at: string;
|
|
1242
|
-
success_url: string | null;
|
|
1243
|
-
cancel_url: string | null;
|
|
1244
|
-
saved_payment_methods: boolean;
|
|
1245
|
-
};
|
|
1246
|
-
export type OrderCheckoutParams = {
|
|
1247
|
-
ui_mode?: "embedded" | "hosted";
|
|
1248
|
-
success_url?: string;
|
|
1249
|
-
cancel_url?: string;
|
|
1250
|
-
expires_at?: string;
|
|
1251
|
-
saved_payment_methods?: boolean;
|
|
1252
|
-
};
|
|
1253
1232
|
export type OrderHostEvent = {
|
|
1254
1233
|
order_id: string;
|
|
1255
1234
|
customer_id: string;
|
|
@@ -1287,6 +1266,13 @@ export type OrderLineRefusal = {
|
|
|
1287
1266
|
hint: string | null;
|
|
1288
1267
|
missing?: string[];
|
|
1289
1268
|
};
|
|
1269
|
+
export type OrderPayURLParams = {
|
|
1270
|
+
embedded?: boolean;
|
|
1271
|
+
success_url?: string;
|
|
1272
|
+
cancel_url?: string;
|
|
1273
|
+
expires_at?: string;
|
|
1274
|
+
saved_payment_methods?: boolean;
|
|
1275
|
+
};
|
|
1290
1276
|
export type OrderPayment = {
|
|
1291
1277
|
status: "processing" | "requires_action" | "requires_payment_method" | "succeeded";
|
|
1292
1278
|
next_action: NextAction | null;
|
|
@@ -1386,7 +1372,7 @@ export type PSPPaymentConfig = {
|
|
|
1386
1372
|
custodian: string;
|
|
1387
1373
|
display_name: string;
|
|
1388
1374
|
flow: string;
|
|
1389
|
-
|
|
1375
|
+
routed: boolean;
|
|
1390
1376
|
config?: Record<string, string>;
|
|
1391
1377
|
status?: string;
|
|
1392
1378
|
retry_after?: number;
|
|
@@ -1404,6 +1390,13 @@ export type PSPRoutingCandidate = {
|
|
|
1404
1390
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1405
1391
|
skip: string | null;
|
|
1406
1392
|
};
|
|
1393
|
+
export type PSPRoutingMatch = {
|
|
1394
|
+
currency?: string;
|
|
1395
|
+
product?: string;
|
|
1396
|
+
price?: string;
|
|
1397
|
+
mode?: string;
|
|
1398
|
+
country?: string;
|
|
1399
|
+
};
|
|
1407
1400
|
export type PSPRoutingPreview = {
|
|
1408
1401
|
policy: string;
|
|
1409
1402
|
rule: number | null;
|
|
@@ -1412,6 +1405,10 @@ export type PSPRoutingPreview = {
|
|
|
1412
1405
|
mode: string | null;
|
|
1413
1406
|
candidates: PSPRoutingCandidate[];
|
|
1414
1407
|
};
|
|
1408
|
+
export type PSPRoutingRule = {
|
|
1409
|
+
match?: PSPRoutingMatch;
|
|
1410
|
+
prefer: string[];
|
|
1411
|
+
};
|
|
1415
1412
|
export type PackagePrice = {
|
|
1416
1413
|
amount?: string;
|
|
1417
1414
|
package_size?: number;
|
package/dist/client/types.d.ts
CHANGED
|
@@ -422,17 +422,12 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
422
422
|
rail: string;
|
|
423
423
|
accepts: string[];
|
|
424
424
|
}[] | null | undefined>>;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
expires_at: z.ZodString;
|
|
432
|
-
success_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
-
cancel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
434
|
-
saved_payment_methods: z.ZodBoolean;
|
|
435
|
-
}, z.core.$strip>>>;
|
|
425
|
+
pay_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
426
|
+
pay_url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
427
|
+
embedded: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
428
|
+
success_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
cancel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
+
saved_payment_methods: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
436
431
|
renewal: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
437
432
|
subscription_id: z.ZodString;
|
|
438
433
|
period_starts_at: z.ZodString;
|
|
@@ -838,7 +833,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
838
833
|
display_name: z.ZodString;
|
|
839
834
|
flow: z.ZodString;
|
|
840
835
|
config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
841
|
-
|
|
836
|
+
routed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
842
837
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
843
838
|
retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
844
839
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
@@ -849,7 +844,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
849
844
|
display_name: string;
|
|
850
845
|
flow: string;
|
|
851
846
|
config?: Record<string, string> | null | undefined;
|
|
852
|
-
|
|
847
|
+
routed?: boolean | null | undefined;
|
|
853
848
|
status?: string | null | undefined;
|
|
854
849
|
retry_after?: number | null | undefined;
|
|
855
850
|
}[], {
|
|
@@ -860,7 +855,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
860
855
|
display_name: string;
|
|
861
856
|
flow: string;
|
|
862
857
|
config?: Record<string, string> | null | undefined;
|
|
863
|
-
|
|
858
|
+
routed?: boolean | null | undefined;
|
|
864
859
|
status?: string | null | undefined;
|
|
865
860
|
retry_after?: number | null | undefined;
|
|
866
861
|
}[] | null | undefined>>;
|
|
@@ -964,7 +959,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
964
959
|
display_name: z.ZodString;
|
|
965
960
|
flow: z.ZodString;
|
|
966
961
|
config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
967
|
-
|
|
962
|
+
routed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
968
963
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
969
964
|
retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
970
965
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
@@ -975,7 +970,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
975
970
|
display_name: string;
|
|
976
971
|
flow: string;
|
|
977
972
|
config?: Record<string, string> | null | undefined;
|
|
978
|
-
|
|
973
|
+
routed?: boolean | null | undefined;
|
|
979
974
|
status?: string | null | undefined;
|
|
980
975
|
retry_after?: number | null | undefined;
|
|
981
976
|
}[], {
|
|
@@ -986,7 +981,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
986
981
|
display_name: string;
|
|
987
982
|
flow: string;
|
|
988
983
|
config?: Record<string, string> | null | undefined;
|
|
989
|
-
|
|
984
|
+
routed?: boolean | null | undefined;
|
|
990
985
|
status?: string | null | undefined;
|
|
991
986
|
retry_after?: number | null | undefined;
|
|
992
987
|
}[] | null | undefined>>;
|
|
@@ -138,10 +138,10 @@ var d = e.object({
|
|
|
138
138
|
display_name: e.string(),
|
|
139
139
|
flow: e.string(),
|
|
140
140
|
config: e.record(e.string(), e.string()).nullish(),
|
|
141
|
-
|
|
141
|
+
routed: e.boolean().nullish(),
|
|
142
142
|
status: e.string().nullish(),
|
|
143
143
|
retry_after: e.number().int().nullish()
|
|
144
|
-
}), f = (e) => e.filter((e) => e.
|
|
144
|
+
}), f = (e) => e.filter((e) => e.routed !== !1), p = /* @__PURE__ */ new Set([
|
|
145
145
|
"tokenize",
|
|
146
146
|
"card",
|
|
147
147
|
"elements"
|
|
@@ -407,14 +407,12 @@ var k = e.string().refine(C, "amount must be an int64 string"), A = e.string(),
|
|
|
407
407
|
rail: e.string(),
|
|
408
408
|
accepts: e.array(e.string())
|
|
409
409
|
})).nullish().transform((e) => e ?? []),
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
saved_payment_methods: e.boolean()
|
|
417
|
-
}).nullish(),
|
|
410
|
+
pay_url: e.string().nullish(),
|
|
411
|
+
pay_url_expires_at: A.nullish(),
|
|
412
|
+
embedded: e.boolean().nullish().transform((e) => e ?? !1),
|
|
413
|
+
success_url: e.string().nullish(),
|
|
414
|
+
cancel_url: e.string().nullish(),
|
|
415
|
+
saved_payment_methods: e.boolean().nullish().transform((e) => e ?? !1),
|
|
418
416
|
renewal: e.object({
|
|
419
417
|
subscription_id: e.string(),
|
|
420
418
|
period_starts_at: A,
|
|
@@ -853,7 +851,7 @@ function De(e = {}) {
|
|
|
853
851
|
...e.expectedTotal === void 0 ? {} : { expected_total: e.expectedTotal },
|
|
854
852
|
...e.payment === void 0 ? {} : { payment: e.payment },
|
|
855
853
|
...e.reusable === void 0 ? {} : { reusable: e.reusable },
|
|
856
|
-
...e.
|
|
854
|
+
...e.payUrl === void 0 ? {} : { pay_url: e.payUrl }
|
|
857
855
|
},
|
|
858
856
|
headers: e.idempotencyKey ? { "Idempotency-Key": e.idempotencyKey } : void 0
|
|
859
857
|
});
|
|
@@ -984,6 +982,6 @@ function Oe(e) {
|
|
|
984
982
|
}
|
|
985
983
|
var $ = (e) => e instanceof X || e instanceof Error && e.name === "WalletRejectedError" || e instanceof t && e.code === "wallet_rejected";
|
|
986
984
|
//#endregion
|
|
987
|
-
export { t as C, a as D, i as E, o as O, c as S, r as T, m as _, De as a,
|
|
985
|
+
export { t as C, a as D, i as E, o as O, c as S, r as T, m as _, De as a, f as b, Ce as c, ne as d, re as f, v as g, y as h, X as i, T as l, C as m, be as n, Se as o, O as p, we as r, $ as s, xe as t, te as u, _ as v, n as w, u as x, d as y };
|
|
988
986
|
|
|
989
|
-
//# sourceMappingURL=client-
|
|
987
|
+
//# sourceMappingURL=client-HWr09qpX.js.map
|