Core SDK
| Type | Purpose |
|---|---|
FanfareConfig | Initialization options for init() (the default export of @fanfare-io/fanfare-sdk-core). |
FanfareSDK | Main SDK instance with auth, journeys, challenges, beacon, and destroy(). |
Journey types
| Type | Purpose |
|---|---|
JourneyHandle | Handle returned by sdk.journeys.get(experienceId). |
JourneyView | Primary UI and action surface. |
JourneySnapshot | Serializable, discriminated snapshot read from snapshot$ for client persistence, cross-tab restore, and diagnostics. Render from view$ (JourneyView); actions live only on the view, never on the snapshot. |
SequenceView | Routed sequence render view, discriminated by phase (and mechanism). Exposes only the actions legal in the current phase — for example enter(), bid(), book(), or claim() — plus the live display$ atom while participating. |
WaitlistAttachmentView | Scheduled-phase attachment on a sequence view (SequenceView.waitlist). Carries status and join() / leave(); it never grants access and is cleared once the distribution opens. |
AccessCodeSubmitResult | Result of RoutedView.submitAccessCode(code): { outcome: "advanced"; sequenceId }, { outcome: "unchanged" }, or { outcome: "gated" }. Only "advanced" commits the code. |
Theme types
WidgetVariant is one of default, retro, rounded, or clean.
i18n types
TranslationMessageKey to keep overrides aligned with SDK message keys.
Widget types
ExperienceWidget or sharing slot definitions across pages.
Shopify types
The storefront integration types most Shopify (Hydrogen/Oxygen, Next, Remix) integrations need. These come from the SSR-safe root barrel, which imports zero React; the provider and hooks live in@fanfare-io/fanfare-sdk-shopify/react.
| Type | Purpose |
|---|---|
GatedLine | The purchase intent: { shopifyProductId, merchandiseId, quantity }. shopifyProductId is a ProductGID (the gate’s policy anchor); merchandiseId is a VariantGID (Shopify’s cartLinesAdd id). Both branded. |
ProductGID / VariantGID | Branded Shopify GID strings; build with the productGid / variantGid constructors so a transposition fails to compile. |
FanfareGatedCheckoutResult | The closed result of gatedCheckout: success ({ cart, checkoutUrl, expDate }) or a typed failure (code / retryable / kind, plus retry() on add_line_failed). |
FanfareCartAdapter<TCart> | Your cart I/O — createCart / addLine / readCart — passed to useFanfareCheckout. |
FanfareGatedCheckoutInput | { gatedLine, ungatedLines? } — what to check out (only gatedLine is policy-checked). |
UseFanfareCheckoutResult<TCart> | The useFanfareCheckout return: { gatedCheckout, claim, pending }. |
FanfareClaimInput | { cartId, purchase } — the object form of the advanced claim. |
ClaimResult | The advanced claim result: { ok, expDate } or { ok: false, reason }. |
ShopifyProductRef | { handle, id } — how useFanfareExperience / FanfareCheckoutGate reference a product. |