@solvapay/react 2.5.0 → 2.6.0-preview-01847ff5f57eafaa4bca393519caeaf6856d968c

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.
@@ -1785,8 +1785,20 @@ interface components {
1785
1785
  * @example active
1786
1786
  */
1787
1787
  status: string;
1788
- /** @description Usage billing state for usage-based plans */
1789
- usage?: components['schemas']['UsageBillingDto'];
1788
+ /** @description Billing period of the active usage window; counts come from `/v1/sdk/limits` */
1789
+ usage?: components['schemas']['SdkUsagePeriodDto'];
1790
+ };
1791
+ SdkUsagePeriodDto: {
1792
+ /**
1793
+ * Billing period of the active usage window; counts come from `/v1/sdk/limits`
1794
+ * @example 2025-11-01T00:00:00Z
1795
+ */
1796
+ periodEnd?: string;
1797
+ /**
1798
+ * Billing period of the active usage window; counts come from `/v1/sdk/limits`
1799
+ * @example 2025-10-01T00:00:00Z
1800
+ */
1801
+ periodStart?: string;
1790
1802
  };
1791
1803
  TaxBreakdownDto: {
1792
1804
  /** @description ISO 4217 currency code */
@@ -1934,33 +1946,6 @@ interface components {
1934
1946
  /** @enum {string} */
1935
1947
  taxBehavior?: 'auto' | 'inclusive' | 'exclusive';
1936
1948
  };
1937
- UsageBillingDto: {
1938
- /**
1939
- * Overage cost in cents
1940
- * @example 0
1941
- */
1942
- overageCost: number;
1943
- /**
1944
- * Units exceeding the plan included amount
1945
- * @example 0
1946
- */
1947
- overageUnits: number;
1948
- /**
1949
- * Period end date
1950
- * @example 2025-11-01T00:00:00Z
1951
- */
1952
- periodEnd?: string;
1953
- /**
1954
- * Period start date
1955
- * @example 2025-10-01T00:00:00Z
1956
- */
1957
- periodStart?: string;
1958
- /**
1959
- * Units consumed in current period
1960
- * @example 150
1961
- */
1962
- used: number;
1963
- };
1964
1949
  UsageRecordResponse: {
1965
1950
  creditDebit?: components['schemas']['CreditDebitSuccessResponse'] | components['schemas']['CreditDebitSkippedResponse'];
1966
1951
  /** @example usage_A1B2C3D4 */
@@ -3953,7 +3938,13 @@ interface PurchaseCheckResult {
3953
3938
  interface GetUsageResult {
3954
3939
  meterRef: string | null;
3955
3940
  total: number | null;
3956
- used: number;
3941
+ /**
3942
+ * Consumed units this period. `limits.used` when the backend measured a
3943
+ * finite cap, otherwise `total - remaining` when both are finite.
3944
+ * `null` means this response did not measure consumption (`limits` null,
3945
+ * unlimited, or credit-based).
3946
+ */
3947
+ used: number | null;
3957
3948
  remaining: number | null;
3958
3949
  /** 0–100, rounded to 2dp. `null` when `total` is unknown. */
3959
3950
  percentUsed: number | null;
@@ -4279,6 +4270,8 @@ interface SolvaPayCopy {
4279
4270
  fullHistory: string;
4280
4271
  /** Portal text link. The button adds the external-link glyph. */
4281
4272
  fullAccount: string;
4273
+ /** Inline account identity. Email and customer ref follow the label. */
4274
+ signedInAs: string;
4282
4275
  creditActivityEyebrow: string;
4283
4276
  chargesEyebrow: string;
4284
4277
  creditActivityCaption: string;
@@ -4444,7 +4437,7 @@ interface SolvaPayCopy {
4444
4437
  activationRequiredHeading: string;
4445
4438
  /**
4446
4439
  * Heading for `kind: 'activation_required'` when every available
4447
- * plan is PAYG (`type: 'usage-based' | 'hybrid'`). Displayed as the
4440
+ * plan is PAYG (`type: 'usage-based'`). Displayed as the
4448
4441
  * topup variant of the activation gate so the user sees "Add
4449
4442
  * credits" framing rather than generic "Activate a plan".
4450
4443
  */
@@ -4472,7 +4465,7 @@ interface SolvaPayCopy {
4472
4465
  * Web-friendly copy for the topup variant of an activation gate —
4473
4466
  * `kind: 'activation_required'` where every available plan is
4474
4467
  * PAYG. `<PaywallNotice.Message>` resolves this when the gate's
4475
- * `plans` are all `type: 'usage-based' | 'hybrid'`.
4468
+ * `plans` are all `type: 'usage-based'`.
4476
4469
  */
4477
4470
  topupRequiredMessage: string;
4478
4471
  paymentRequiredProductSuffix: string;
@@ -4571,8 +4564,7 @@ interface TransportLimitsResult {
4571
4564
  needsTopUp?: boolean;
4572
4565
  /**
4573
4566
  * Consumed units this period. Present only when the backend measured
4574
- * a finite cap. Authoritative — do not reconstruct from
4575
- * `purchase.usage.used`.
4567
+ * a finite cap. The purchase wire does not carry a count.
4576
4568
  */
4577
4569
  used?: number;
4578
4570
  /**
@@ -5516,7 +5508,8 @@ interface UseUsageReturn {
5516
5508
  interface UsageSnapshot {
5517
5509
  meterRef: string | null;
5518
5510
  total: number | null;
5519
- used: number;
5511
+ /** Measured consumption, or `null` when this response did not measure it. */
5512
+ used: number | null;
5520
5513
  remaining: number | null;
5521
5514
  percentUsed: number | null;
5522
5515
  periodStart?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/react",
3
- "version": "2.5.0",
3
+ "version": "2.6.0-preview-01847ff5f57eafaa4bca393519caeaf6856d968c",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -57,7 +57,7 @@
57
57
  "directory": "packages/react"
58
58
  },
59
59
  "peerDependencies": {
60
- "@solvapay/mcp-core": "^0.2.8 || ^0.3.0 || ^0.4.0",
60
+ "@solvapay/mcp-core": "0.4.7-preview-01847ff5f57eafaa4bca393519caeaf6856d968c",
61
61
  "react": "^18.2.0 || ^19.0.0",
62
62
  "react-dom": "^18.2.0 || ^19.0.0"
63
63
  },
@@ -85,8 +85,8 @@
85
85
  "react-dom": "^19.2.5",
86
86
  "typescript": "^5.9.3",
87
87
  "vitest": "^4.1.2",
88
- "@solvapay/server": "2.9.0",
89
- "@solvapay/mcp-core": "0.4.6",
88
+ "@solvapay/mcp-core": "0.4.7-preview-01847ff5f57eafaa4bca393519caeaf6856d968c",
89
+ "@solvapay/server": "2.10.0-preview-01847ff5f57eafaa4bca393519caeaf6856d968c",
90
90
  "@solvapay/test-utils": "0.0.0"
91
91
  },
92
92
  "scripts": {