@openrails/billing-ui 0.249.0 → 0.251.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 +33 -0
- package/README.md +32 -14
- 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 +6 -6
- package/dist/client/generated/wire.d.ts +38 -40
- package/dist/client/types.d.ts +18 -17
- package/dist/{client-rFrCMrkn.js → client-imFR1UCe.js} +91 -92
- package/dist/client-imFR1UCe.js.map +1 -0
- package/dist/client.js +2 -2
- package/dist/embedded-payment.d.ts +25 -0
- package/dist/hooks-C9JkHcRt.js +553 -0
- package/dist/hooks-C9JkHcRt.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +768 -735
- 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/config.d.ts +12 -3
- package/dist/react/provider.d.ts +17 -4
- 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 +0 -537
- 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_option_withheld" | "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_email_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_option_withheld", "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";
|
|
@@ -140,7 +140,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
140
140
|
readonly responses: {
|
|
141
141
|
readonly 200: "Order";
|
|
142
142
|
};
|
|
143
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
143
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "customer_email_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_option_withheld", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
144
144
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
145
145
|
}, {
|
|
146
146
|
readonly method: "POST";
|
|
@@ -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";
|
|
@@ -2593,7 +2593,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
2593
2593
|
readonly responses: {
|
|
2594
2594
|
readonly 200: "Order";
|
|
2595
2595
|
};
|
|
2596
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
2596
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "customer_email_required", "entitlement_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_option_withheld", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
2597
2597
|
readonly errorSets: readonly ["tier:network", "request"];
|
|
2598
2598
|
}, {
|
|
2599
2599
|
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;
|
|
@@ -1298,6 +1284,7 @@ export type OrderPaymentOption = {
|
|
|
1298
1284
|
psp_id: string;
|
|
1299
1285
|
rail: string;
|
|
1300
1286
|
accepts: string[];
|
|
1287
|
+
fallback: boolean;
|
|
1301
1288
|
};
|
|
1302
1289
|
export type OrderPaymentParams = {
|
|
1303
1290
|
payment_method_id?: string;
|
|
@@ -1386,7 +1373,7 @@ export type PSPPaymentConfig = {
|
|
|
1386
1373
|
custodian: string;
|
|
1387
1374
|
display_name: string;
|
|
1388
1375
|
flow: string;
|
|
1389
|
-
|
|
1376
|
+
routed: boolean;
|
|
1390
1377
|
config?: Record<string, string>;
|
|
1391
1378
|
status?: string;
|
|
1392
1379
|
retry_after?: number;
|
|
@@ -1404,6 +1391,13 @@ export type PSPRoutingCandidate = {
|
|
|
1404
1391
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1405
1392
|
skip: string | null;
|
|
1406
1393
|
};
|
|
1394
|
+
export type PSPRoutingMatch = {
|
|
1395
|
+
currency?: string;
|
|
1396
|
+
product?: string;
|
|
1397
|
+
price?: string;
|
|
1398
|
+
mode?: string;
|
|
1399
|
+
country?: string;
|
|
1400
|
+
};
|
|
1407
1401
|
export type PSPRoutingPreview = {
|
|
1408
1402
|
policy: string;
|
|
1409
1403
|
rule: number | null;
|
|
@@ -1412,6 +1406,10 @@ export type PSPRoutingPreview = {
|
|
|
1412
1406
|
mode: string | null;
|
|
1413
1407
|
candidates: PSPRoutingCandidate[];
|
|
1414
1408
|
};
|
|
1409
|
+
export type PSPRoutingRule = {
|
|
1410
|
+
match?: PSPRoutingMatch;
|
|
1411
|
+
prefer: string[];
|
|
1412
|
+
};
|
|
1415
1413
|
export type PackagePrice = {
|
|
1416
1414
|
amount?: string;
|
|
1417
1415
|
package_size?: number;
|
package/dist/client/types.d.ts
CHANGED
|
@@ -413,26 +413,24 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
413
413
|
psp_id: z.ZodString;
|
|
414
414
|
rail: z.ZodString;
|
|
415
415
|
accepts: z.ZodArray<z.ZodString>;
|
|
416
|
+
fallback: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
416
417
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
417
418
|
psp_id: string;
|
|
418
419
|
rail: string;
|
|
419
420
|
accepts: string[];
|
|
421
|
+
fallback: boolean;
|
|
420
422
|
}[], {
|
|
421
423
|
psp_id: string;
|
|
422
424
|
rail: string;
|
|
423
425
|
accepts: string[];
|
|
426
|
+
fallback: boolean;
|
|
424
427
|
}[] | 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>>>;
|
|
428
|
+
pay_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
429
|
+
pay_url_expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
430
|
+
embedded: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
431
|
+
success_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
|
+
cancel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
+
saved_payment_methods: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
436
434
|
renewal: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
437
435
|
subscription_id: z.ZodString;
|
|
438
436
|
period_starts_at: z.ZodString;
|
|
@@ -519,14 +517,17 @@ export declare const cartSchema: z.ZodObject<{
|
|
|
519
517
|
psp_id: z.ZodString;
|
|
520
518
|
rail: z.ZodString;
|
|
521
519
|
accepts: z.ZodArray<z.ZodString>;
|
|
520
|
+
fallback: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
|
|
522
521
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
523
522
|
psp_id: string;
|
|
524
523
|
rail: string;
|
|
525
524
|
accepts: string[];
|
|
525
|
+
fallback: boolean;
|
|
526
526
|
}[], {
|
|
527
527
|
psp_id: string;
|
|
528
528
|
rail: string;
|
|
529
529
|
accepts: string[];
|
|
530
|
+
fallback: boolean;
|
|
530
531
|
}[] | null | undefined>>;
|
|
531
532
|
last_changed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
532
533
|
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -838,7 +839,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
838
839
|
display_name: z.ZodString;
|
|
839
840
|
flow: z.ZodString;
|
|
840
841
|
config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
841
|
-
|
|
842
|
+
routed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
842
843
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
843
844
|
retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
844
845
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
@@ -849,7 +850,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
849
850
|
display_name: string;
|
|
850
851
|
flow: string;
|
|
851
852
|
config?: Record<string, string> | null | undefined;
|
|
852
|
-
|
|
853
|
+
routed?: boolean | null | undefined;
|
|
853
854
|
status?: string | null | undefined;
|
|
854
855
|
retry_after?: number | null | undefined;
|
|
855
856
|
}[], {
|
|
@@ -860,7 +861,7 @@ export declare const paymentConfigSchema: z.ZodObject<{
|
|
|
860
861
|
display_name: string;
|
|
861
862
|
flow: string;
|
|
862
863
|
config?: Record<string, string> | null | undefined;
|
|
863
|
-
|
|
864
|
+
routed?: boolean | null | undefined;
|
|
864
865
|
status?: string | null | undefined;
|
|
865
866
|
retry_after?: number | null | undefined;
|
|
866
867
|
}[] | null | undefined>>;
|
|
@@ -964,7 +965,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
964
965
|
display_name: z.ZodString;
|
|
965
966
|
flow: z.ZodString;
|
|
966
967
|
config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
967
|
-
|
|
968
|
+
routed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
968
969
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
969
970
|
retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
970
971
|
}, z.core.$strip>>>>, z.ZodTransform<{
|
|
@@ -975,7 +976,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
975
976
|
display_name: string;
|
|
976
977
|
flow: string;
|
|
977
978
|
config?: Record<string, string> | null | undefined;
|
|
978
|
-
|
|
979
|
+
routed?: boolean | null | undefined;
|
|
979
980
|
status?: string | null | undefined;
|
|
980
981
|
retry_after?: number | null | undefined;
|
|
981
982
|
}[], {
|
|
@@ -986,7 +987,7 @@ export declare const customerConfigSchema: z.ZodObject<{
|
|
|
986
987
|
display_name: string;
|
|
987
988
|
flow: string;
|
|
988
989
|
config?: Record<string, string> | null | undefined;
|
|
989
|
-
|
|
990
|
+
routed?: boolean | null | undefined;
|
|
990
991
|
status?: string | null | undefined;
|
|
991
992
|
retry_after?: number | null | undefined;
|
|
992
993
|
}[] | null | undefined>>;
|