@openrails/billing-ui 0.262.1 → 0.263.1

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.
@@ -604,6 +604,7 @@ export type CreditGrantSpec = {
604
604
  expires_after_days?: number;
605
605
  };
606
606
  export type CreditLimit = {
607
+ inherit?: boolean;
607
608
  currency: string;
608
609
  amount: string;
609
610
  };
@@ -681,6 +682,7 @@ export type CustomerNetwork = {
681
682
  method: "connect" | "payment_page" | "sign_in";
682
683
  };
683
684
  export type CustomerSettings = {
685
+ usage_billing?: UsageBillingAccount[];
684
686
  credit_limits: CreditLimit[];
685
687
  trust_levels: TrustLevel[];
686
688
  low_balance_lines: LowBalanceLine[];
@@ -1063,6 +1065,7 @@ export type MerchantCheckoutSettings = {
1063
1065
  export type MerchantConfigurationState = {
1064
1066
  revision: number;
1065
1067
  display_name: string;
1068
+ usage_billing?: UsageBillingSettings;
1066
1069
  profile?: MerchantProfile;
1067
1070
  collection_threshold?: string;
1068
1071
  monthly_floor?: string;
@@ -2181,6 +2184,7 @@ export type UpdateAlertWebhookParams = {
2181
2184
  enabled?: boolean | null;
2182
2185
  };
2183
2186
  export type UpdateCustomerParams = {
2187
+ usage_billing?: UsageBillingAccountUpdate[];
2184
2188
  credit_limits?: CreditLimit[];
2185
2189
  trust_levels?: TrustLevel[];
2186
2190
  low_balance_lines?: LowBalanceLine[];
@@ -2190,6 +2194,7 @@ export type UpdateCustomerParams = {
2190
2194
  export type UpdateMerchantConfigurationParams = {
2191
2195
  expected_revision?: number | null;
2192
2196
  display_name?: string;
2197
+ usage_billing?: UsageBillingSettings;
2193
2198
  profile?: MerchantProfile;
2194
2199
  collection_threshold?: string;
2195
2200
  monthly_floor?: string;
@@ -2254,6 +2259,26 @@ export type Usage = {
2254
2259
  rows: UsageRow[];
2255
2260
  next_cursor: string | null;
2256
2261
  };
2262
+ export type UsageBillingAccount = {
2263
+ currency: string;
2264
+ billing_anchor: string | null;
2265
+ next_bill_at: string | null;
2266
+ minimum_invoice_amount: string | null;
2267
+ };
2268
+ export type UsageBillingAccountUpdate = {
2269
+ currency?: string;
2270
+ billing_anchor?: string | null;
2271
+ minimum_invoice_amount?: string | null;
2272
+ };
2273
+ export type UsageBillingCurrency = {
2274
+ currency: string;
2275
+ credit_limit: string;
2276
+ minimum_invoice_amount: string;
2277
+ };
2278
+ export type UsageBillingSettings = {
2279
+ billing_day: number;
2280
+ currencies: UsageBillingCurrency[];
2281
+ };
2257
2282
  export type UsageCharge = {
2258
2283
  meter_key: string;
2259
2284
  model: "dynamic" | "flat" | "package" | "per_unit" | "tiered";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrails/billing-ui",
3
- "version": "0.262.1",
3
+ "version": "0.263.1",
4
4
  "description": "Embeddable OpenRails purchase and account-billing UI: client, React hooks and styled components.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -73,7 +73,7 @@
73
73
  "@stripe/stripe-js": "^9.17.0",
74
74
  "class-variance-authority": "^0.7.1",
75
75
  "cn": "0.4.0",
76
- "zod": "^4.4.3",
76
+ "zod": "^4.6.6",
77
77
  "@tanstack/react-form": "^1.33.3",
78
78
  "@tanstack/react-table": "^8.21.3",
79
79
  "clsx": "^2.1.1",