@solvapay/react 2.1.1 → 2.2.0-preview-11dbbe603cd1b9a44cc41b5eee3686bc4000f97f
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 +23 -2
- package/dist/{chunk-HQH6KSXJ.js → chunk-EWB43JVC.js} +5 -2
- package/dist/{chunk-QXNNMNCV.js → chunk-M6O7ZWNP.js} +136 -51
- package/dist/{chunk-LL6AYSTC.js → chunk-WISTNSUH.js} +371 -317
- package/dist/{index-CBWGkBqF.d.ts → index-APG9WYgS.d.cts} +33 -5
- package/dist/{index-SylJb9Rh.d.cts → index-ofZwGvIZ.d.ts} +33 -5
- package/dist/index.cjs +1455 -1319
- package/dist/index.d.cts +82 -17
- package/dist/index.d.ts +82 -17
- package/dist/index.js +9 -3
- package/dist/mcp/index.cjs +1561 -1345
- package/dist/mcp/index.d.cts +176 -129
- package/dist/mcp/index.d.ts +176 -129
- package/dist/mcp/index.js +178 -92
- package/dist/mcp/styles.css +39 -14
- package/dist/primitives/index.cjs +822 -786
- package/dist/primitives/index.d.cts +4 -4
- package/dist/primitives/index.d.ts +4 -4
- package/dist/primitives/index.js +2 -2
- package/dist/{shared-D0hmT1qU.d.cts → shared-BQbMyX5V.d.cts} +14 -1
- package/dist/{shared-CUl6mTC1.d.ts → shared-DJdsOLag.d.ts} +14 -1
- package/dist/styles.css +20 -0
- package/package.json +5 -5
package/dist/mcp/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as SolvaPayTransport, _ as SolvaPayProviderInitial, D as SolvaPayConfig, B as BootstrapPlanLike, H as Merchant } from '../shared-BQbMyX5V.cjs';
|
|
2
2
|
import { TOOL_FOR_VIEW, SolvaPayMcpViewKind, BootstrapMerchant, BootstrapProduct, BootstrapPlan, BootstrapCustomer } from '@solvapay/mcp-core';
|
|
3
3
|
export { MCP_TOOL_NAMES, McpToolName } from '@solvapay/mcp-core';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -64,12 +64,20 @@ declare function createMcpAppAdapter(app: McpAppLike): SolvaPayTransport;
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Probe whether `@stripe/stripe-js` can mount inside the current MCP host
|
|
67
|
-
* sandbox.
|
|
68
|
-
*
|
|
69
|
-
*
|
|
67
|
+
* sandbox. Hosts that deliver the declared `_meta.ui.csp.frameDomains` to
|
|
68
|
+
* the widget document (basic-host, ChatGPT) let Stripe load normally.
|
|
69
|
+
* Reading `frameDomains` is not the same as the emitted policy surviving
|
|
70
|
+
* to the guest document — MCPJam currently reports a runtime mismatch
|
|
71
|
+
* between its effective CSP model and the browser's enforced policy.
|
|
72
|
+
* Non-compliant hosts (Claude today — see anthropics/claude-ai-mcp#40)
|
|
70
73
|
* hardcode `frame-src 'self' blob: data:` and the nested Stripe iframes
|
|
71
74
|
* are refused even though the parent script loads fine.
|
|
72
75
|
*
|
|
76
|
+
* A second, harder constraint: sandbox flags are inherited by descendant
|
|
77
|
+
* frames. A chain missing `allow-same-origin` cannot host Stripe at all
|
|
78
|
+
* regardless of `frame-src` — Stripe's own inner iframe fails its
|
|
79
|
+
* `script-src 'self'` when the ancestor omits it.
|
|
80
|
+
*
|
|
73
81
|
* ## Why `ready` alone is a lie on Claude
|
|
74
82
|
*
|
|
75
83
|
* Stripe's `PaymentElement` fires its `ready` event as soon as the
|
|
@@ -178,6 +186,25 @@ interface McpBridgeAppLike {
|
|
|
178
186
|
text: string;
|
|
179
187
|
}>;
|
|
180
188
|
}) => Promise<unknown> | void;
|
|
189
|
+
/**
|
|
190
|
+
* `ui/open-link` — ask the host to open a URL in the user's browser.
|
|
191
|
+
* On hosts whose iframe sandbox omits `allow-popups` (Claude) this is
|
|
192
|
+
* the only way out of the frame: `<a target="_blank">` and
|
|
193
|
+
* `window.open()` are both dropped there without an error.
|
|
194
|
+
*/
|
|
195
|
+
openLink?: (params: {
|
|
196
|
+
url: string;
|
|
197
|
+
}) => Promise<{
|
|
198
|
+
isError?: boolean;
|
|
199
|
+
} | undefined>;
|
|
200
|
+
/**
|
|
201
|
+
* Host capabilities resolved during `connect()`. `openLinks` gates
|
|
202
|
+
* `openLink` — a host can expose the method without declaring
|
|
203
|
+
* support, and calling it blind would swallow the click.
|
|
204
|
+
*/
|
|
205
|
+
getHostCapabilities?: () => {
|
|
206
|
+
openLinks?: unknown;
|
|
207
|
+
} | undefined;
|
|
181
208
|
}
|
|
182
209
|
interface NotifyModelContextParams {
|
|
183
210
|
/** Short, plain-text update ("User selected Pro"). */
|
|
@@ -351,11 +378,10 @@ declare function isTransportToolName(name: string): boolean;
|
|
|
351
378
|
* Classification of the host-invoked tool that opened the widget iframe.
|
|
352
379
|
* Drives `<McpApp>`'s mount branching:
|
|
353
380
|
*
|
|
354
|
-
* - `intent` —
|
|
355
|
-
* the corresponding tool via `fetchMcpBootstrap`.
|
|
381
|
+
* - `intent` — the `account` viewer. Call it via `fetchMcpBootstrap`.
|
|
356
382
|
* - `other` — no tool info, or a SolvaPay transport tool as the
|
|
357
|
-
* iframe entry point (rare). Fall back to the `
|
|
358
|
-
*
|
|
383
|
+
* iframe entry point (rare). Fall back to the `account`
|
|
384
|
+
* viewer for a fresh snapshot.
|
|
359
385
|
*
|
|
360
386
|
* The previous `data` kind was removed with the text-only paywall
|
|
361
387
|
* refactor: payable merchant tools no longer advertise
|
|
@@ -363,7 +389,7 @@ declare function isTransportToolName(name: string): boolean;
|
|
|
363
389
|
* silent success or a paywall response. If one of those ever fires
|
|
364
390
|
* anyway (a legacy opt-in server), the classification falls through
|
|
365
391
|
* to `other` and the shell asks `fetchMcpBootstrap` for a clean
|
|
366
|
-
* `
|
|
392
|
+
* `account` snapshot.
|
|
367
393
|
*/
|
|
368
394
|
type HostEntryClassification = {
|
|
369
395
|
kind: 'intent';
|
|
@@ -523,6 +549,127 @@ declare function waitForInitialToolResult(app: McpAppBootstrapLike & AppToolResu
|
|
|
523
549
|
*/
|
|
524
550
|
declare function seedMcpCaches(initial: SolvaPayProviderInitial, config: SolvaPayConfig): void;
|
|
525
551
|
|
|
552
|
+
/**
|
|
553
|
+
* Pure derivation helpers that map a plan / active purchase onto the
|
|
554
|
+
* activation strategy + action-affordance shape the shell renders per
|
|
555
|
+
* plan type.
|
|
556
|
+
*
|
|
557
|
+
* Keeping these in a standalone module lets the hosted manage page
|
|
558
|
+
* share the same matrix as the MCP shell — "one plan-shape matrix,
|
|
559
|
+
* two surfaces" — and makes the 4 × 2 × 3 test matrix from the plan a
|
|
560
|
+
* pure-function target (no RTL needed).
|
|
561
|
+
*
|
|
562
|
+
* The shape is derived from the wire's `options[]` through the
|
|
563
|
+
* `@solvapay/core` readers. These helpers previously keyed off
|
|
564
|
+
* `planType`, `meterRef`, `meterId`, and `limit`, none of which the
|
|
565
|
+
* backend sends: every plan fell through to the unknown branch, so a
|
|
566
|
+
* pay-as-you-go plan (which has no headline `price`) resolved to
|
|
567
|
+
* `'free'` and metered subscriptions were indistinguishable from
|
|
568
|
+
* unlimited ones.
|
|
569
|
+
*/
|
|
570
|
+
|
|
571
|
+
type PlanShape = 'free' | 'trial' | 'usage-based' | 'recurring-unlimited' | 'recurring-metered';
|
|
572
|
+
/**
|
|
573
|
+
* Strategy the Plan tab uses when the user clicks a plan card:
|
|
574
|
+
* - `activate` — free / trial / free-priced recurring: instant activation
|
|
575
|
+
* via `ActivationFlow.Summary` + `ActivateButton`.
|
|
576
|
+
* - `topup-first` — usage-based: ActivationFlow's `AmountPicker`
|
|
577
|
+
* branch.
|
|
578
|
+
* - `paid-checkout` — recurring with a non-zero price: mount
|
|
579
|
+
* `PaymentFormGate` + `PaymentForm.*` for inline Stripe Elements.
|
|
580
|
+
*/
|
|
581
|
+
type ActivationStrategy = 'activate' | 'topup-first' | 'paid-checkout';
|
|
582
|
+
/**
|
|
583
|
+
* The subset of a plan — or of the plan snapshot frozen onto a purchase
|
|
584
|
+
* — that the shape derivation reads. A plan carries `requiresPayment`;
|
|
585
|
+
* a snapshot may not. Usage-counting and the rest come out of `options[]`.
|
|
586
|
+
*/
|
|
587
|
+
interface PlanLike {
|
|
588
|
+
/** Catalog / snapshot identifier used to match a purchase back to a live plan. */
|
|
589
|
+
reference?: string | null;
|
|
590
|
+
/** Composable pricing options: charges, billing cycle, limit, trial. */
|
|
591
|
+
options?: PricingOptionLike[] | null;
|
|
592
|
+
/** `false` marks a free plan. Only present on a plan, not a snapshot. */
|
|
593
|
+
requiresPayment?: boolean | null;
|
|
594
|
+
/** Derived headline amount; only a fallback for snapshots frozen before `options[]`. */
|
|
595
|
+
price?: number | null;
|
|
596
|
+
currency?: string | null;
|
|
597
|
+
/** Frozen on snapshots; usage-based when `options[]` is missing. */
|
|
598
|
+
isMetered?: boolean | null;
|
|
599
|
+
}
|
|
600
|
+
interface PurchaseSnapshotLike {
|
|
601
|
+
planSnapshot?: PlanLike | null;
|
|
602
|
+
/** Whether the customer has a payment method on file. */
|
|
603
|
+
hasPaymentMethod?: boolean;
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Map a `BootstrapPlan` / `PlanSnapshot` to its concrete shape. The
|
|
607
|
+
* shapes are distinct in UX: each drives a different summary string, a
|
|
608
|
+
* different set of CTAs, and a different activity-strip variant.
|
|
609
|
+
*
|
|
610
|
+
* A billing cycle is what separates a subscription from a one-off, and
|
|
611
|
+
* metering is what separates capped from unlimited. A paid plan with
|
|
612
|
+
* neither is a one-time purchase, which this matrix has no member for
|
|
613
|
+
* and folds into `'recurring-unlimited'` — the same bucket it landed in
|
|
614
|
+
* before, and the one that routes it to paid checkout.
|
|
615
|
+
*/
|
|
616
|
+
declare function resolvePlanShape(plan: PlanLike | null | undefined): PlanShape | null;
|
|
617
|
+
/**
|
|
618
|
+
* Pick the activation strategy for a plan the user just clicked.
|
|
619
|
+
*
|
|
620
|
+
* Free and trial plans activate instantly, usage-based always tops up
|
|
621
|
+
* first, and everything else goes to Stripe checkout. A zero-priced
|
|
622
|
+
* plan needs no separate branch: it resolves to `'free'`, because
|
|
623
|
+
* charging nothing is what makes a plan free.
|
|
624
|
+
*/
|
|
625
|
+
declare function resolveActivationStrategy(plan: PlanLike | null | undefined): ActivationStrategy;
|
|
626
|
+
/**
|
|
627
|
+
* Per-variant action flags for the Plan-active card. Only flags that
|
|
628
|
+
* are `true` render affordances — this collapses the "should we show
|
|
629
|
+
* Cancel?" boolean maze into a single resolver call.
|
|
630
|
+
*
|
|
631
|
+
* Rules from the plan:
|
|
632
|
+
* - `topUp` — only on usage-based purchases.
|
|
633
|
+
* - `cancel` — recurring (paid subscription) and free plans. PAYG
|
|
634
|
+
* has no renewal to cancel.
|
|
635
|
+
* - `changePlan` — always, when the product exposes more than one
|
|
636
|
+
* plan.
|
|
637
|
+
* - `managePortal` — only when the customer has a payment method on
|
|
638
|
+
* file. Free plans that never charged a card skip this.
|
|
639
|
+
* - `upgrade` — shown *instead of* `changePlan` when the active plan
|
|
640
|
+
* is free AND at least one paid plan exists.
|
|
641
|
+
*/
|
|
642
|
+
interface PlanActions {
|
|
643
|
+
topUp: boolean;
|
|
644
|
+
cancel: boolean;
|
|
645
|
+
changePlan: boolean;
|
|
646
|
+
managePortal: boolean;
|
|
647
|
+
upgrade: boolean;
|
|
648
|
+
}
|
|
649
|
+
interface PlanActionsInput {
|
|
650
|
+
purchase: PurchaseSnapshotLike | null | undefined;
|
|
651
|
+
/** Total plans exposed on the product. */
|
|
652
|
+
planCount: number;
|
|
653
|
+
/** Number of paid plans (price > 0, not free) on the product. */
|
|
654
|
+
paidPlanCount: number;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Overlay a live catalog plan onto a (possibly thin) purchase snapshot.
|
|
658
|
+
* Snapshots frozen without `options[]` collapse PAYG to `{ price: 0 }`,
|
|
659
|
+
* which `resolvePlanShape` reads as `'free'`. Prefer the snapshot's
|
|
660
|
+
* `options[]` when present; otherwise take them from the catalog match.
|
|
661
|
+
*/
|
|
662
|
+
declare function mergePlanSnapshot(snapshot: PlanLike | null | undefined, catalog: PlanLike | null | undefined): PlanLike | null;
|
|
663
|
+
declare function findCatalogPlan(plans: readonly PlanLike[] | undefined, snapshot: PlanLike | null | undefined, planRef?: string | null): PlanLike | undefined;
|
|
664
|
+
declare function resolvePlanActions({ purchase, planCount, paidPlanCount, }: PlanActionsInput): PlanActions;
|
|
665
|
+
/**
|
|
666
|
+
* "Your activity" strip variant shown at the top of a surface when a
|
|
667
|
+
* returning customer has an active purchase. Hidden when the customer
|
|
668
|
+
* has no active purchase.
|
|
669
|
+
*/
|
|
670
|
+
type ActivityStripKind = 'none' | 'payg-balance' | 'recurring-unlimited-renew' | 'recurring-metered-usage' | 'free-usage';
|
|
671
|
+
declare function resolveActivityStrip(purchase: PurchaseSnapshotLike | null | undefined): ActivityStripKind;
|
|
672
|
+
|
|
526
673
|
/**
|
|
527
674
|
* Per-element className overrides for `<Mcp*View>` primitives.
|
|
528
675
|
*
|
|
@@ -604,11 +751,17 @@ interface McpAccountViewProps {
|
|
|
604
751
|
*/
|
|
605
752
|
onTopup?: () => void;
|
|
606
753
|
/**
|
|
607
|
-
* Called when the user clicks "Pick a plan" from the empty state
|
|
608
|
-
* "See plans" on the
|
|
609
|
-
* switch to
|
|
754
|
+
* Called when the user clicks "Pick a plan" from the empty state,
|
|
755
|
+
* "See plans" on the credits-only state, or Upgrade / Change plan
|
|
756
|
+
* on an active plan. Wired by the shell to switch to checkout.
|
|
610
757
|
*/
|
|
611
758
|
onChangePlan?: () => void;
|
|
759
|
+
/**
|
|
760
|
+
* Product catalog used to decide Upgrade vs Change plan and to
|
|
761
|
+
* format a PAYG rate when the purchase snapshot is thin. The shell
|
|
762
|
+
* passes `bootstrap.plans`.
|
|
763
|
+
*/
|
|
764
|
+
plans?: readonly PlanLike[];
|
|
612
765
|
/**
|
|
613
766
|
* Skip the Customer + Seller detail cards. `<McpAppShell>` sets this
|
|
614
767
|
* when it mounts the persistent right-hand sidebar (whenever
|
|
@@ -616,7 +769,7 @@ interface McpAccountViewProps {
|
|
|
616
769
|
*/
|
|
617
770
|
hideDetailCards?: boolean;
|
|
618
771
|
}
|
|
619
|
-
declare function McpAccountView({ classNames, onTopup, onChangePlan, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
|
|
772
|
+
declare function McpAccountView({ classNames, onTopup, onChangePlan, plans, hideDetailCards, }: McpAccountViewProps): react_jsx_runtime.JSX.Element;
|
|
620
773
|
|
|
621
774
|
interface McpCheckoutViewProps {
|
|
622
775
|
productRef: string;
|
|
@@ -694,9 +847,10 @@ declare function McpTopupView({ publishableKey, returnUrl, onTopupSuccess, onBac
|
|
|
694
847
|
* The `paywall` / `nudge` kinds were removed as part of the text-only
|
|
695
848
|
* paywall refactor: merchant paywall / nudge responses are plain text
|
|
696
849
|
* narrations now, not widget surfaces. The iframe is only mounted for
|
|
697
|
-
* the
|
|
850
|
+
* the `account` viewer (slash prompts remap onto it with a `view`).
|
|
698
851
|
*/
|
|
699
|
-
|
|
852
|
+
|
|
853
|
+
type McpViewKind = SolvaPayMcpViewKind;
|
|
700
854
|
/**
|
|
701
855
|
* @deprecated Use `McpViewKind`. This alias exists for one minor
|
|
702
856
|
* version to give internal callers a grace window on the rename; the
|
|
@@ -865,115 +1019,6 @@ interface McpAppProps {
|
|
|
865
1019
|
}
|
|
866
1020
|
declare function McpApp({ app, productRef: productRefOverride, views, classNames, footer, onInitError, applyContext, onClose, messageOnSuccess, }: McpAppProps): react_jsx_runtime.JSX.Element;
|
|
867
1021
|
|
|
868
|
-
/**
|
|
869
|
-
* Pure derivation helpers that map a plan / active purchase onto the
|
|
870
|
-
* activation strategy + action-affordance shape the shell renders per
|
|
871
|
-
* plan type.
|
|
872
|
-
*
|
|
873
|
-
* Keeping these in a standalone module lets the hosted manage page
|
|
874
|
-
* share the same matrix as the MCP shell — "one plan-shape matrix,
|
|
875
|
-
* two surfaces" — and makes the 4 × 2 × 3 test matrix from the plan a
|
|
876
|
-
* pure-function target (no RTL needed).
|
|
877
|
-
*
|
|
878
|
-
* The shape is derived from the wire's `options[]` through the
|
|
879
|
-
* `@solvapay/core` readers. These helpers previously keyed off
|
|
880
|
-
* `planType`, `meterRef`, `meterId`, and `limit`, none of which the
|
|
881
|
-
* backend sends: every plan fell through to the unknown branch, so a
|
|
882
|
-
* pay-as-you-go plan (which has no headline `price`) resolved to
|
|
883
|
-
* `'free'` and metered subscriptions were indistinguishable from
|
|
884
|
-
* unlimited ones.
|
|
885
|
-
*/
|
|
886
|
-
|
|
887
|
-
type PlanShape = 'free' | 'trial' | 'usage-based' | 'recurring-unlimited' | 'recurring-metered';
|
|
888
|
-
/**
|
|
889
|
-
* Strategy the Plan tab uses when the user clicks a plan card:
|
|
890
|
-
* - `activate` — free / trial / free-priced recurring: instant activation
|
|
891
|
-
* via `ActivationFlow.Summary` + `ActivateButton`.
|
|
892
|
-
* - `topup-first` — usage-based: ActivationFlow's `AmountPicker`
|
|
893
|
-
* branch.
|
|
894
|
-
* - `paid-checkout` — recurring with a non-zero price: mount
|
|
895
|
-
* `PaymentFormGate` + `PaymentForm.*` for inline Stripe Elements.
|
|
896
|
-
*/
|
|
897
|
-
type ActivationStrategy = 'activate' | 'topup-first' | 'paid-checkout';
|
|
898
|
-
/**
|
|
899
|
-
* The subset of a plan — or of the plan snapshot frozen onto a purchase
|
|
900
|
-
* — that the shape derivation reads. A plan carries `requiresPayment`;
|
|
901
|
-
* a snapshot may not. Usage-counting and the rest come out of `options[]`.
|
|
902
|
-
*/
|
|
903
|
-
interface PlanLike {
|
|
904
|
-
/** Composable pricing options: charges, billing cycle, limit, trial. */
|
|
905
|
-
options?: PricingOptionLike[] | null;
|
|
906
|
-
/** `false` marks a free plan. Only present on a plan, not a snapshot. */
|
|
907
|
-
requiresPayment?: boolean | null;
|
|
908
|
-
/** Derived headline amount; only a fallback for snapshots frozen before `options[]`. */
|
|
909
|
-
price?: number | null;
|
|
910
|
-
currency?: string | null;
|
|
911
|
-
}
|
|
912
|
-
interface PurchaseSnapshotLike {
|
|
913
|
-
planSnapshot?: PlanLike | null;
|
|
914
|
-
/** Whether the customer has a payment method on file. */
|
|
915
|
-
hasPaymentMethod?: boolean;
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Map a `BootstrapPlan` / `PlanSnapshot` to its concrete shape. The
|
|
919
|
-
* shapes are distinct in UX: each drives a different summary string, a
|
|
920
|
-
* different set of CTAs, and a different activity-strip variant.
|
|
921
|
-
*
|
|
922
|
-
* A billing cycle is what separates a subscription from a one-off, and
|
|
923
|
-
* metering is what separates capped from unlimited. A paid plan with
|
|
924
|
-
* neither is a one-time purchase, which this matrix has no member for
|
|
925
|
-
* and folds into `'recurring-unlimited'` — the same bucket it landed in
|
|
926
|
-
* before, and the one that routes it to paid checkout.
|
|
927
|
-
*/
|
|
928
|
-
declare function resolvePlanShape(plan: PlanLike | null | undefined): PlanShape | null;
|
|
929
|
-
/**
|
|
930
|
-
* Pick the activation strategy for a plan the user just clicked.
|
|
931
|
-
*
|
|
932
|
-
* Free and trial plans activate instantly, usage-based always tops up
|
|
933
|
-
* first, and everything else goes to Stripe checkout. A zero-priced
|
|
934
|
-
* plan needs no separate branch: it resolves to `'free'`, because
|
|
935
|
-
* charging nothing is what makes a plan free.
|
|
936
|
-
*/
|
|
937
|
-
declare function resolveActivationStrategy(plan: PlanLike | null | undefined): ActivationStrategy;
|
|
938
|
-
/**
|
|
939
|
-
* Per-variant action flags for the Plan-active card. Only flags that
|
|
940
|
-
* are `true` render affordances — this collapses the "should we show
|
|
941
|
-
* Cancel?" boolean maze into a single resolver call.
|
|
942
|
-
*
|
|
943
|
-
* Rules from the plan:
|
|
944
|
-
* - `topUp` — only on usage-based purchases.
|
|
945
|
-
* - `cancel` — recurring (paid subscription) and free plans. PAYG
|
|
946
|
-
* has no renewal to cancel.
|
|
947
|
-
* - `changePlan` — always, when the product exposes more than one
|
|
948
|
-
* plan.
|
|
949
|
-
* - `managePortal` — only when the customer has a payment method on
|
|
950
|
-
* file. Free plans that never charged a card skip this.
|
|
951
|
-
* - `upgrade` — shown *instead of* `changePlan` when the active plan
|
|
952
|
-
* is free AND at least one paid plan exists.
|
|
953
|
-
*/
|
|
954
|
-
interface PlanActions {
|
|
955
|
-
topUp: boolean;
|
|
956
|
-
cancel: boolean;
|
|
957
|
-
changePlan: boolean;
|
|
958
|
-
managePortal: boolean;
|
|
959
|
-
upgrade: boolean;
|
|
960
|
-
}
|
|
961
|
-
interface PlanActionsInput {
|
|
962
|
-
purchase: PurchaseSnapshotLike | null | undefined;
|
|
963
|
-
/** Total plans exposed on the product. */
|
|
964
|
-
planCount: number;
|
|
965
|
-
/** Number of paid plans (price > 0, not free) on the product. */
|
|
966
|
-
paidPlanCount: number;
|
|
967
|
-
}
|
|
968
|
-
declare function resolvePlanActions({ purchase, planCount, paidPlanCount, }: PlanActionsInput): PlanActions;
|
|
969
|
-
/**
|
|
970
|
-
* "Your activity" strip variant shown at the top of a surface when a
|
|
971
|
-
* returning customer has an active purchase. Hidden when the customer
|
|
972
|
-
* has no active purchase.
|
|
973
|
-
*/
|
|
974
|
-
type ActivityStripKind = 'none' | 'payg-balance' | 'recurring-unlimited-renew' | 'recurring-metered-usage' | 'free-usage';
|
|
975
|
-
declare function resolveActivityStrip(purchase: PurchaseSnapshotLike | null | undefined): ActivityStripKind;
|
|
976
|
-
|
|
977
1022
|
interface BackLinkProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
978
1023
|
/** Visible label; typically `"Back to my account"` or `"Change amount"`. */
|
|
979
1024
|
label: string;
|
|
@@ -1106,11 +1151,13 @@ interface McpSellerDetailsCardProps {
|
|
|
1106
1151
|
showVerifiedBadge?: boolean;
|
|
1107
1152
|
}
|
|
1108
1153
|
/**
|
|
1109
|
-
* Seller details — company name, legal entity, support email/URL
|
|
1110
|
-
*
|
|
1111
|
-
*
|
|
1112
|
-
*
|
|
1154
|
+
* Seller details — company name, legal entity, support email/URL.
|
|
1155
|
+
* Contact details are plain text (not anchors): mailto: and
|
|
1156
|
+
* target=_blank both navigate the sandboxed widget iframe itself.
|
|
1157
|
+
* Compliance-relevant: a customer paying through the iframe should
|
|
1158
|
+
* see who they're actually paying, to the same level of detail as
|
|
1159
|
+
* hosted checkout.
|
|
1113
1160
|
*/
|
|
1114
1161
|
declare function McpSellerDetailsCard({ classNames, showVerifiedBadge, }: McpSellerDetailsCardProps): react_jsx_runtime.JSX.Element | null;
|
|
1115
1162
|
|
|
1116
|
-
export { type ActivationStrategy, type ActivityStripKind, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, BackLink, type BackLinkProps, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, McpCustomerDetailsCard, type McpCustomerDetailsCardProps, McpHostInfoProvider, type McpHostInfoProviderProps, type McpMessageOnSuccess, McpSellerDetailsCard, type McpSellerDetailsCardProps, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type NotifyModelContextParams, type PlanActions, type PlanActionsInput, type PlanLike, type PlanShape, type PurchaseSnapshotLike, SOLVAPAY_TRANSPORT_TOOL_NAMES, type SendMessageParams, type StripeProbeState, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, classifyHostEntry, createMcpAppAdapter, fetchMcpBootstrap, fetchMcpBootstrapViaResource, isTransportToolName, parseBootstrapFromToolResult, resolveActivationStrategy, resolveActivityStrip, resolveMcpClassNames, resolvePlanActions, resolvePlanShape, seedMcpCaches, useHostLocale, useHostName, useMcpBridge, useMcpToolResult, useStripeProbe, waitForInitialToolResult };
|
|
1163
|
+
export { type ActivationStrategy, type ActivityStripKind, AppHeader, type AppHeaderMode, type AppHeaderProps, type AppToolResultEvents, BackLink, type BackLinkProps, HOSTS_WITH_MERCHANT_CHROME, type HostEntryClassification, McpAccountView, type McpAccountViewProps, McpApp, type McpAppBootstrapLike, type McpAppFull, type McpAppLike, type McpAppProps, McpAppShell, type McpAppShellProps, type McpAppViewOverrides, type McpBootstrap, type McpBridgeAppLike, McpBridgeProvider, type McpBridgeProviderProps, type McpBridgeValue, McpCheckoutView, type McpCheckoutViewProps, McpCustomerDetailsCard, type McpCustomerDetailsCardProps, McpHostInfoProvider, type McpHostInfoProviderProps, type McpMessageOnSuccess, McpSellerDetailsCard, type McpSellerDetailsCardProps, type McpSuccessEvent, type McpTabKind, type McpToolResult, McpTopupView, type McpTopupViewProps, type McpUiHostContextLike, type McpView, type McpViewClassNames, type McpViewKind, McpViewRouter, type McpViewRouterProps, type NotifyModelContextParams, type PlanActions, type PlanActionsInput, type PlanLike, type PlanShape, type PurchaseSnapshotLike, SOLVAPAY_TRANSPORT_TOOL_NAMES, type SendMessageParams, type StripeProbeState, type WaitForInitialToolResultOptions, type WaitForInitialToolResultResult, classifyHostEntry, createMcpAppAdapter, fetchMcpBootstrap, fetchMcpBootstrapViaResource, findCatalogPlan, isTransportToolName, mergePlanSnapshot, parseBootstrapFromToolResult, resolveActivationStrategy, resolveActivityStrip, resolveMcpClassNames, resolvePlanActions, resolvePlanShape, seedMcpCaches, useHostLocale, useHostName, useMcpBridge, useMcpToolResult, useStripeProbe, waitForInitialToolResult };
|