@farthershore/farthershore-js/components exports
Every public export and declaration from @farthershore/farthershore-js/components.
Every public export and declaration from @farthershore/farthershore-js/components.
Import from @farthershore/farthershore-js/components. This reference is extracted from the published declaration surface for version 0.32.0. Read the collection's guides for workflows, prerequisites and failure handling.
Test seam — clear the session-scoped docs memo between cases.
Declaration source: packages/farthershore-js/dist/components/product-docs/fetch-product-docs.d.ts#L10.
export declare function _resetBusinessDocsCache(): void;
A self-contained "you don't have access" card that names the missing
permission and (optionally) starts a request-access flow.
Declaration source: packages/farthershore-js/dist/components/access-denied.d.ts#L37.
export declare function AccessDenied({ requiredPermission, variant, title, description, onRequestAccess, className, }: AccessDeniedProps): import("react").JSX.Element;
Public export AccessDeniedProps.
Declaration source: packages/farthershore-js/dist/components/access-denied.d.ts#L2.
export interface AccessDeniedProps {
/** The missing permission, named for the user (e.g. `audit_log:read`).
* Omit when unknown (a bare 403). */
requiredPermission?: string;
/** Presentation size: `page` (default) for a route-level deny, `inline`
* for an embedded section. */
variant?: "page" | "inline";
/** Override the title. */
title?: string;
/** Extra context under the title (defaults to a role-based explanation). */
description?: ReactNode;
/**
* When provided, renders a "Request access" button. Resolve the promise to
* flip the button into a confirmation ("Request sent — an owner will
* review it."); reject to show a retryable error. Wire it to
* `fs.rbac.accessRequests.create(...)` or any custom flow.
*/
onRequestAccess?: () => Promise<void> | void;
/** Appended to the root card. */
className?: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { ApiKeysPanel }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/keys.d.ts#L12.
declare const ApiKeysPanel: typeof ApiKeysPanelImpl__ec7052a86409;
Public export ApiKeysPanelProps.
Declaration source: packages/farthershore-js/dist/components/keys.d.ts#L1.
export interface ApiKeysPanelProps {
/** Appended to the root element. */
className?: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { AuditLogTable }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/audit-log-table.d.ts#L19.
declare const AuditLogTable: typeof AuditLogTableImpl__b13b7a55916f;
Public export AuditLogTableProps.
Declaration source: packages/farthershore-js/dist/components/audit-log-table.d.ts#L1.
export interface AuditLogTableProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "Audit log". */
title?: string;
/**
* Request-local workspace scope. Pass `null` to read the user's default
* subscription without changing the portal's selected workspace.
*/
organizationId?: string | null;
}
Public export AuthGuardDecision.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L9.
export interface AuthGuardDecision {
status: AuthGuardStatus;
/** Present only when `status === "redirecting"` — where the host should go. */
redirectTo?: string;
}
Public export AuthGuardInput.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L14.
export interface AuthGuardInput {
/** Whether the auth layer has finished initializing. */
loaded: boolean;
/** Whether a user is currently signed in. */
signedIn: boolean;
/** Whether the gated surface requires authentication. */
requireAuth: boolean;
/** Where to send a signed-out user off an auth-required surface. Defaults to
* "/" (the public landing — the dev-portal-template convention). */
redirectTo?: string;
/** A Managed-RBAC permission the surface additionally requires (FAR-700),
* in the `<route-id>:read|write` grammar. Checked via {@link hasPermission}
* AFTER the sign-in gate; a signed-in user lacking it → `denied`.
*
* ⚠️ UX ONLY: this hides UI, but the gateway's `permission` constraint is
* the security boundary — a call the user isn't permitted to make is
* denied at the edge regardless of what the client renders. */
requirePermission?: string;
/** The permission check (normally `useFsAuth().hasPermission`). Required
* for `requirePermission` to have any effect; returns false while the
* server-resolved permissions are still loading, so the guard denies
* first and reveals once they arrive. */
hasPermission?: (key: string) => boolean;
}
The guard's resolved decision. `redirecting` carries the target the host
should navigate to; `allowed` reveals the protected subtree; `loading`
holds (no flash) until the auth layer settles; `denied` means the user is
signed in but lacks a required Managed-RBAC permission (FAR-700) — render
the fallback, don't redirect.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L8.
export type AuthGuardStatus = "loading" | "allowed" | "redirecting" | "denied";
Renders children only while the auth layer is initializing.
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L30.
export declare function AuthLoading({ children }: {
children: ReactNode;
}): import("react").JSX.Element | null;
Public export AutoKeyBanner.
Declaration source: packages/farthershore-js/dist/components/auto-key-banner.d.ts#L7.
export declare function AutoKeyBanner({ className, title, }?: AutoKeyBannerProps): import("react").JSX.Element | null;
Public export AutoKeyBannerProps.
Declaration source: packages/farthershore-js/dist/components/auto-key-banner.d.ts#L1.
export interface AutoKeyBannerProps {
/** Appended to the banner root. */
className?: string;
/** Heading. Defaults to "Your API key". */
title?: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { BillingSummary }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/billing.d.ts#L20.
declare const BillingSummary: typeof BillingSummaryImpl__8a108aa98a90;
Public export BillingSummaryProps.
Declaration source: packages/farthershore-js/dist/components/billing.d.ts#L2.
export interface BillingSummaryProps {
/** Appended to the root card. */
className?: string;
/** Override specific regions of the default card. */
slots?: {
/** Replaces the default "Manage billing" CTA button. A host overriding
* this owns its own behavior — internal handlers (e.g. `onManage`) are
* deliberately not exposed through the slot. */
actions?: ReactNode;
};
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page.
Declaration source: packages/farthershore-js/dist/components/bill-preview-card.d.ts#L11.
declare const BillPreviewCard: typeof BillPreviewCardImpl__d0492f0124c1;
Pure presenter — props in, markup out; renderable against fixtures.
Declaration source: packages/farthershore-js/dist/components/bill-preview-card.d.ts#L3.
export declare function BillPreviewView({ preview }: {
preview: BillPreview__c6a85a661e87;
}): import("react").JSX.Element;
Public export BusinessApiOperationEntry.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L101.
export type BusinessApiOperationEntry = {
id: string;
method: BusinessOpenApiHttpMethod;
path: string;
displayPath: string;
operationId?: string;
summary: string;
description?: string;
tags: string[];
deprecated: boolean;
parameters: BusinessOpenApiParameterObject[];
requestBody?: BusinessOpenApiRequestBodyObject;
responses: BusinessApiResponseEntry[];
security: string[];
serverUrl?: string;
};
Public export BusinessApiReference.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L140.
export declare function BusinessApiReference({ document, title, description, serverUrl, filterTags, showInfo, className, emptyState, }: BusinessApiReferenceProps): import("react").JSX.Element;
Public export BusinessApiReferenceProps.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L117.
export interface BusinessApiReferenceProps {
/** OpenAPI 3.x document or compatible subset. */
document: BusinessOpenApiDocument;
/** Override `document.info.title`. */
title?: string;
/** Override `document.info.description`. Markdown-lite is supported. */
description?: string;
/** Override the displayed server. Defaults to the first server in scope. */
serverUrl?: string;
/** Only render operations whose tags intersect this allow-list. */
filterTags?: string[];
/** Render the document title/version/description header. Default true. */
showInfo?: boolean;
/** Appended to the root. */
className?: string;
/** Optional empty state when the document has no operations. */
emptyState?: ReactNode;
}
Public export BusinessApiResponseEntry.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L93.
export type BusinessApiResponseEntry = {
status: string;
description?: string;
content: Array<{
mediaType: string;
schema?: BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject;
}>;
};
Public export BusinessDocs.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L151.
export declare function BusinessDocs(props?: BusinessDocsProps): JSX.Element;
Tabbed code card for `<CodeBlock>` MDX elements. Ported from the SSR card
minus the expand-to-fullscreen dialog (simplification — copy + tabs +
response strip are intact).
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L64.
export declare function BusinessDocsCodeCard({ block, }: {
block: BusinessDocsCodeBlock__2a7a6f0b1817;
}): import("react").JSX.Element | null;
A collection is a self-contained docs bundle (its own navigation + pages).
When an index declares `collections`, page slugs are QUALIFIED with the
collection id (`<id>/<slug>`) — so the collection is simply the first segment
of an ordinary slug and all routing/href/fetch machinery keeps working.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L29.
export type BusinessDocsCollection = {
id: string;
label: string;
/** Optional tab image, rendered as an `<img src>` — an absolute/root-relative
* URL or data: URI (bare tokens are dropped by the reader). */
icon?: string;
/** The collection's landing page (a qualified `<id>/<slug>`). */
defaultPage: string;
navigation: BusinessDocsNavGroup[];
/** Flattened qualified slugs, in navigation order. */
pages: string[];
};
Public export BusinessDocsData.
Declaration source: packages/farthershore-js/dist/components/product-docs/fetch-product-docs.d.ts#L2.
export type BusinessDocsData = {
index: BusinessDocsIndex;
docs: Record<string, string>;
};
Public export BusinessDocsEmptyReason.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L40.
export type BusinessDocsEmptyReason =
/** The URL under /docs doesn't parse to a route. */
"invalid-route"
/** No docs published for this product yet. */
| "not-published"
/** The route is fine but this page isn't in the published index. */
| "page-not-found";
Public export BusinessDocsEmptyShell.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-view.d.ts#L31.
export declare function BusinessDocsEmptyShell({ signedIn, standalonePreview, className, children, }: {
signedIn: boolean;
standalonePreview: boolean;
/** Appended to the mode's empty-shell className. */
className?: string;
children: ReactNode;
}): import("react").JSX.Element;
Titled empty state inside the mode-aware docs shell — the body the
default experience shows for unpublished/missing docs.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L11.
export declare function BusinessDocsEmptyState({ title, body, href, linkLabel, signedIn, standalonePreview, className, children, }: {
title: string;
body: string;
href?: string;
linkLabel?: string;
signedIn: boolean;
standalonePreview: boolean;
className?: string;
children?: ReactNode;
}): JSX.Element;
Public export BusinessDocsIndex.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L41.
export type BusinessDocsIndex = {
title?: string;
description?: string;
defaultPage?: string;
version?: string;
/** Declared selectable languages (absent = single-language docs). */
languages?: DocsLanguage[];
defaultLanguage?: string;
navigation: BusinessDocsNavGroup[];
pages: string[];
/**
* Optional logical separation into multiple bundles ("collections"). Absent =
* single flat bundle (byte-identical to before collections existed). When
* present, top-level `navigation` is empty and each collection carries its
* own; `pages`/`defaultPage` span the collections (qualified slugs).
*/
collections?: BusinessDocsCollection[];
/** The collection shown by default (a valid `collections[].id`). */
defaultCollection?: string;
};
The docs loading shell (mode-aware skeleton).
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L22.
export declare function BusinessDocsLoading({ signedIn, standalonePreview, className, }: {
signedIn: boolean;
standalonePreview: boolean;
className?: string;
}): JSX.Element;
Public export BusinessDocsMobileNav.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L54.
export declare function BusinessDocsMobileNav({ index, currentSlug, view, }: {
index: BusinessDocsIndex;
currentSlug: string;
view?: "standalone";
}): import("react").JSX.Element;
Public export BusinessDocsNav.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L10.
export declare function BusinessDocsNav({ index, currentSlug, collapsed, onNavigate, collapsibleGroups, view, headings, }: {
index: BusinessDocsIndex;
currentSlug: string;
collapsed?: boolean;
onNavigate?: () => void;
collapsibleGroups?: boolean;
view?: "standalone";
headings?: BusinessDocsHeading__a6d35f30fcdc[];
}): import("react").JSX.Element;
Public export BusinessDocsNavGroup.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L18.
export type BusinessDocsNavGroup = {
title: string;
icon?: string;
pages: BusinessDocsPageEntry[];
};
The parsed shape of ONE docs page — what single-page mode resolves and what
`<BusinessDocsPageBody>` renders. A subset of the full page-ready state, with
the shell-only fields (nav index, pager, mode) dropped.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-customize.d.ts#L24.
export interface BusinessDocsPage {
/** The page's slug within the docs tree. */
slug: string;
/** Frontmatter title, falling back to the index entry's title. */
title: string;
/** Frontmatter description (or the index entry's), if any. */
description?: string;
/** The page body with frontmatter stripped — the markdown/MDX source. */
mdxSource: string;
/** Extracted h2/h3 headings (for a custom on-this-page rail). */
headings: BusinessDocsHeading__a6d35f30fcdc[];
/** Parsed frontmatter (title/description/layout/previous/next). */
frontmatter: BusinessDocsFrontmatter__ceffafa81da1;
}
Public export BusinessDocsPageActions.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L6.
export declare function BusinessDocsPageActions({ markdown, standaloneHref, }: {
markdown: string;
standaloneHref?: string | null;
}): import("react").JSX.Element;
Low-level docs page BODY — markdown + interactive code cards (and an
optional title/description hero), WITHOUT the docs shell (no sidebar, no
topbar, no pager). This is the seam for embedding a single docs page inside
a fully custom layout: resolve the page with the single-page mode of
`useBusinessDocsPage`, then drop its body wherever you want.
Renders inside `.fs-docs-prose` (and an `.fs-docs` scope) so the docs
stylesheet still applies; the host owns everything around it.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-customize.d.ts#L62.
export declare function BusinessDocsPageBody({ page, mdxComponents, showHero, showPageActions, className, }: BusinessDocsPageBodyProps): import("react").JSX.Element;
Public export BusinessDocsPageBodyProps.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-customize.d.ts#L38.
export interface BusinessDocsPageBodyProps {
/** The resolved single page (from `useBusinessDocsPage({ slugPath, single:
* true })`, or assembled by hand). */
page: BusinessDocsPage;
/** Override the markdown component map (threaded into SafeDocsMarkdown). */
mdxComponents?: DocsMdxComponents;
/** Show the title/description hero above the body. Default true. */
showHero?: boolean;
/** Show the copy-markdown page action in the hero. Default true (no
* standalone-link action here — that is a shell concern). */
showPageActions?: boolean;
/** Appended to the body root className. */
className?: string;
}
Public export BusinessDocsPageEntry.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L3.
export type BusinessDocsPageEntry = {
slug: string;
title: string;
description?: string;
icon?: string;
badge?: string;
layout?: BusinessDocsLayout__e9623ab37090;
hidden?: boolean;
/**
* When present, this page only exists for the listed language ids (filtered
* to the index's declared `languages`). Absent = universal. The reader-side
* filtering is the later B-LANG / C-LANG work.
*/
languages?: string[];
};
Public export BusinessDocsPageInput.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L71.
export interface BusinessDocsPageInput {
/** Current docs path under /docs ("" = index). Defaults to the location. */
slugPath?: string;
/** Force the standalone (public) shell. Defaults to ?view=standalone. */
view?: "standalone";
/** Single-page mode — when true, the result still resolves the same
* route → fetch → ready/empty state, but ALSO surfaces the resolved page
* as `result.page` (title/description/mdxSource/headings/frontmatter) so a
* builder can render ONE page (via `<BusinessDocsPageBody>`) inside a custom
* layout, with no shell. Additive: the full shell fields are unaffected. */
single?: boolean;
/** Explicit active documentation language id. Wins over the URL `?lang=`.
* When omitted the language resolves from `?lang=` → the index's
* `defaultLanguage` → its first declared language → null (single-language).
* Resolution only; the stateful selection lives in the language provider. */
language?: string | null;
}
Public export BusinessDocsPager.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L67.
export declare function BusinessDocsPager({ pages, current, defaultSlug, view, }: {
pages: BusinessDocsPageEntry[];
current: string;
defaultSlug?: string | null;
view?: "standalone";
}): import("react").JSX.Element | null;
Public export BusinessDocsPageResult.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L88.
export interface BusinessDocsPageResult {
/** Resolved embedded/standalone mode (managed auth + standalone preview). */
mode: DocsMode;
signedIn: boolean;
standalonePreview: boolean;
/** Branding for the standalone topbar. */
productName: string;
iconUrl: string | null;
logoUrl: string | null;
/** Reserved for callers that navigate after hook resolution. */
redirectTo: string | null;
state: BusinessDocsPageState;
/** Single-page projection of the resolved page — non-null ONLY when the
* state is `ready` (regardless of the `single` input flag, so it is also
* available to shell callers that want the bare page shape). `null` while
* booting/loading/empty. Feed straight into `<BusinessDocsPageBody>`. */
page: BusinessDocsPage | null;
/** The index's declared selectable languages (empty for single-language
* docs / before the index resolves). Seed for `<DocsLanguageProvider>`. */
languages: ReadonlyArray<DocsLanguage>;
/** The resolved active language id (props → `?lang=` → defaultLanguage →
* languages[0] → null). `null` = no language concept (render everything). */
activeLanguage: string | null;
/** Declared collections (empty for a single-bundle doc). Seed for
* `<DocsCollectionsProvider>` and the tab bar. */
collections: ReadonlyArray<DocsCollection>;
/** The active collection id (first slug segment resolved against the declared
* collections), or null for a single-bundle doc. */
activeCollection: string | null;
}
Public export BusinessDocsPageState.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L47.
export type BusinessDocsPageState =
/** Bootstrap (product/branding) still resolving — nothing fetched yet. */
{
status: "booting";
}
/** Docs fetch in flight, or a latest-release redirect is about to land. */
| {
status: "loading";
} | {
status: "empty";
reason: BusinessDocsEmptyReason;
backHref: string;
} | {
status: "ready";
docs: BusinessDocsData;
currentSlug: string;
defaultSlug: string;
pageTitle: string;
pageDescription?: string;
mdxSource: string;
headings: BusinessDocsHeading__a6d35f30fcdc[];
frontmatter: BusinessDocsFrontmatter__ceffafa81da1;
standaloneHref: string;
};
Public export BusinessDocsProps.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L127.
export interface BusinessDocsProps {
/** Current docs path under /docs ("" = index). When omitted the component
* reads window.location.pathname itself (re-read on popstate). */
slugPath?: string;
/** Force the standalone (public) shell — the ?view=standalone preview.
* When omitted it is read from window.location.search. */
view?: "standalone";
/** Host SPA router integration; defaults are plain anchors + location. */
Link?: DocsLinkComponent;
navigate?: DocsNavigate;
className?: string;
/** Override the markdown component map — a tag→component map merged OVER the
* managed docs renderer (heading anchors, host-router links, copy-able
* fenced code). Un-overridden tags keep managed behavior. Optional. */
mdxComponents?: DocsMdxComponents;
/** Host ReactNodes injected at named shell seams (headerBefore /
* sidebarFooter / asideRail). Optional. */
slots?: BusinessDocsSlots;
/** Explicit active documentation language id — wins over the URL `?lang=`.
* When omitted the language resolves from `?lang=` → the index's declared
* default → its first language → null (single-language, no selector).
* Optional. */
language?: string | null;
}
Public export BusinessDocsSearch.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L50.
export declare function BusinessDocsSearch({ index, view, }: {
index: BusinessDocsIndex;
view?: "standalone";
}): import("react").JSX.Element;
Public export BusinessDocsSidebar.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L19.
export declare function BusinessDocsSidebar({ title, index, currentSlug, collapsible, showSearch, showFooter, view, headings, extraFooter, }: {
title: string;
description?: string | null;
index: BusinessDocsIndex;
currentSlug: string;
collapsible?: boolean;
showSearch?: boolean;
showFooter?: boolean;
view?: "standalone";
headings?: BusinessDocsHeading__a6d35f30fcdc[];
/** Host node rendered in the sidebar's bottom region, below the nav and
* above the powered-by footer — the `slots.sidebarFooter` seam. Optional;
* hidden when the sidebar is collapsed. */
extraFooter?: ReactNode;
}): import("react").JSX.Element;
Host-supplied ReactNodes injected at named seams of the managed docs shell.
Each is optional and rendered verbatim — a builder adds a callout banner,
a sidebar footer, or a right-hand rail without re-composing the shell.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-customize.d.ts#L8.
export interface BusinessDocsSlots {
/** Rendered at the very top of the shell, before the topbar/sidebar — e.g.
* an announcement banner spanning the full width. */
headerBefore?: ReactNode;
/** Rendered inside the sidebar's bottom region, below the nav — e.g. a
* support link or version badge. */
sidebarFooter?: ReactNode;
/** Rendered as a right-hand rail alongside the article — e.g. an on-this-
* page TOC or a "was this helpful?" widget. */
asideRail?: ReactNode;
}
The standalone docs header. Ported from the SSR BusinessDocsStandaloneHeader
(brand → default docs page, version selector, mobile Browse docs, theme
toggle) plus a back-to-portal link. Rendered by BusinessDocsView only when
`mode.showStandaloneHeader` — the embedded mode lives inside the host's
own portal chrome and gets the in-main mobile nav instead (SSR parity).
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-shell.d.ts#L41.
export declare function BusinessDocsTopBar({ productName, index, currentSlug, iconUrl, logoUrl, view, signedIn, }: {
productName: string;
index: BusinessDocsIndex;
currentSlug: string;
iconUrl?: string | null;
logoUrl?: string | null;
view?: "standalone";
signedIn: boolean;
}): import("react").JSX.Element;
Public export BusinessDocsView.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-view.d.ts#L30.
export declare function BusinessDocsView({ signedIn, standalonePreview, productName, docs, currentSlug, defaultSlug, iconUrl, logoUrl, pageTitle, pageDescription, mdxSource, headings, standaloneHref, className, mdxComponents, slots, activeCollection, }: BusinessDocsViewProps): import("react").JSX.Element;
Public export BusinessDocsViewProps.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-view.d.ts#L6.
export type BusinessDocsViewProps = {
signedIn: boolean;
standalonePreview: boolean;
productName: string;
docs: BusinessDocsData;
currentSlug: string;
defaultSlug: string;
iconUrl: string | null;
logoUrl: string | null;
pageTitle: string;
pageDescription?: string;
mdxSource: string;
headings: BusinessDocsHeading__a6d35f30fcdc[];
standaloneHref: string;
/** Appended to the mode's root className (host-extension contract). */
className?: string;
/** Override the markdown component map — threaded into SafeDocsMarkdown. */
mdxComponents?: DocsMdxComponents;
/** Host ReactNodes injected at named shell seams. */
slots?: BusinessDocsSlots;
/** The active collection id when the docs set has collections (else null) —
* scopes the sidebar/pager to that collection's bundle. */
activeCollection?: string | null;
};
Public export BusinessOpenApiDocument.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L76.
export type BusinessOpenApiDocument = {
openapi?: string;
info?: {
title?: string;
version?: string;
description?: string;
};
servers?: BusinessOpenApiServer[];
tags?: Array<{
name: string;
description?: string;
}>;
paths?: Record<string, BusinessOpenApiPathItemObject>;
components?: {
schemas?: Record<string, BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject>;
};
};
Public export BusinessOpenApiHttpMethod.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L2.
export type BusinessOpenApiHttpMethod = "get" | "post" | "put" | "patch" | "delete" | "options" | "head" | "trace";
Public export BusinessOpenApiMediaTypeObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L25.
export type BusinessOpenApiMediaTypeObject = {
schema?: BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject;
example?: unknown;
examples?: Record<string, {
summary?: string;
description?: string;
value?: unknown;
externalValue?: string;
}>;
};
Public export BusinessOpenApiOperationObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L58.
export type BusinessOpenApiOperationObject = {
operationId?: string;
summary?: string;
description?: string;
tags?: string[];
deprecated?: boolean;
parameters?: Array<BusinessOpenApiParameterObject | BusinessOpenApiReferenceObject>;
requestBody?: BusinessOpenApiRequestBodyObject | BusinessOpenApiReferenceObject;
responses?: Record<string, BusinessOpenApiResponseObject | BusinessOpenApiReferenceObject>;
security?: BusinessOpenApiSecurityRequirement[];
servers?: BusinessOpenApiServer[];
};
Public export BusinessOpenApiParameterObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L35.
export type BusinessOpenApiParameterObject = {
name: string;
in: "path" | "query" | "header" | "cookie" | string;
required?: boolean;
deprecated?: boolean;
description?: string;
schema?: BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject;
example?: unknown;
};
Public export BusinessOpenApiPathItemObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L70.
export type BusinessOpenApiPathItemObject = {
summary?: string;
description?: string;
servers?: BusinessOpenApiServer[];
parameters?: Array<BusinessOpenApiParameterObject | BusinessOpenApiReferenceObject>;
} & Partial<Record<BusinessOpenApiHttpMethod, BusinessOpenApiOperationObject | BusinessOpenApiReferenceObject>>;
Public export BusinessOpenApiReferenceObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L3.
export type BusinessOpenApiReferenceObject = {
$ref: string;
summary?: string;
description?: string;
};
Public export BusinessOpenApiRequestBodyObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L44.
export type BusinessOpenApiRequestBodyObject = {
required?: boolean;
description?: string;
content?: Record<string, BusinessOpenApiMediaTypeObject>;
};
Public export BusinessOpenApiResponseObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L49.
export type BusinessOpenApiResponseObject = {
description?: string;
content?: Record<string, BusinessOpenApiMediaTypeObject>;
};
Public export BusinessOpenApiSchemaObject.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L8.
export type BusinessOpenApiSchemaObject = {
type?: string | string[];
format?: string;
title?: string;
description?: string;
enum?: unknown[];
const?: unknown;
default?: unknown;
nullable?: boolean;
required?: string[];
properties?: Record<string, BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject>;
items?: BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject;
allOf?: Array<BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject>;
anyOf?: Array<BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject>;
oneOf?: Array<BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject>;
additionalProperties?: boolean | BusinessOpenApiSchemaObject | BusinessOpenApiReferenceObject;
};
Public export BusinessOpenApiSecurityRequirement.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L53.
export type BusinessOpenApiSecurityRequirement = Record<string, string[]>;
Public export BusinessOpenApiServer.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L54.
export type BusinessOpenApiServer = {
url: string;
description?: string;
};
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { CancelSubscription }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/cancel-subscription.d.ts#L14.
declare const CancelSubscription: typeof CancelSubscriptionImpl__11041f19fbf6;
Public export CancelSubscriptionProps.
Declaration source: packages/farthershore-js/dist/components/cancel-subscription.d.ts#L1.
export interface CancelSubscriptionProps {
/** Appended to the trigger button. */
className?: string;
/** Called after an inline (free-tier) cancel succeeds — refresh /me. */
onCancelled?: () => void;
}
Normalize an arbitrary tab label/prop to a canonical language id, or `null`
when the tab is auxiliary (a response/rotate/json strip — NOT a language
variant). Matching is case-insensitive and alias-aware.
When `languages` is provided the info-string is matched against the declared
set first: a match on `id` or any of a language's `aliases` (case-insensitive)
wins and returns that language's `id`. Auxiliary labels always return `null`
regardless. When no declared set is provided the built-in alias table is used
as a fallback (js→node, py→python, golang→go) so existing callers are
unaffected.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L27.
export declare function classifyTabLanguage(labelOrProp: string, languages?: ReadonlyArray<DocsLanguage>): string | null;
`<CodeGroup>` MDX component — a no-op placeholder for when the MDX renderer
encounters a `<CodeGroup>` tag that wasn't pre-extracted by
`extractMdxSegments`. In the managed docs flow, `extractMdxSegments` strips
every `<CodeGroup>` from the source BEFORE react-markdown sees it (building a
`BusinessDocsCodeBlock` instead), so this component is never actually called
during normal rendering. It is exported so builders can reference the type in
a custom `mdxComponents` override map, and to satisfy the MDX component-map
registration requirement.
Declaration source: packages/farthershore-js/dist/components/product-docs/markdown.d.ts#L23.
export declare function CodeGroup(props: {
children?: import("react").ReactNode;
title?: string;
}): null;
Public export collectBusinessApiOperations.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L135.
export declare function collectBusinessApiOperations(document: BusinessOpenApiDocument): BusinessApiOperationEntry[];
Public export ComponentRegistration.
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L47.
export interface ComponentRegistration {
/** A `custom:<slug>` key (builder components) or a managed id (to override
* a managed default host-side). */
id: string;
/** Render-gate permission. Omit to fall through to overlay/managed/derived
* resolution. */
permission?: string;
/** Mutating-affordance permission; derived `<subject>:write` otherwise. */
writePermission?: string;
/** Default deny render for this component. */
gateMode?: ComponentGateMode__052103626acf;
/** Renders ungated by design. Explicit only — never inferred. */
presentational?: boolean;
}
A selectable documentation collection (a self-contained docs bundle).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections.d.ts#L2.
export type DocsCollection = {
/** Stable id: URL segment, R2 key prefix, storage key, and matching (e.g. "api"). */
id: string;
/** Human label for the selector/tab (e.g. "API reference"). */
label: string;
/** Optional tab image URL. The default selector renders it as an `<img src>`,
* so it must be an absolute/root-relative URL or data: URI. */
icon?: string;
};
Public export DocsCollectionsContextValue.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L2.
export type DocsCollectionsContextValue = {
/** The resolved active collection id, or null when there are no collections. */
activeCollection: string | null;
/** The full collection list (empty when unprovided / single bundle). */
collections: ReadonlyArray<DocsCollection>;
/** Switch the active collection (persists + lets the host navigate to it). */
setCollection: (id: string) => void;
};
Unstyled collection switcher — a `<button>` per collection (the host styles it
into a tab bar). Hidden entirely when there are ≤1 collections (a single-bundle
doc shows no control). Reads/writes through the docs collection context, so it
is a drop-in once a `<DocsCollectionsProvider>` is in scope. Ships NO CSS:
the active tab is exposed via `aria-pressed` for the host to style.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L51.
export declare function DocsCollectionSelector({ className, }?: DocsCollectionSelectorProps): import("react").JSX.Element | null;
Public export DocsCollectionSelectorProps.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L41.
export type DocsCollectionSelectorProps = {
className?: string;
};
Public export DocsCollectionsProvider.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L10.
declare const DocsCollectionsProvider: import("react").Provider<DocsCollectionsContextValue>;
A selectable documentation language (an SDK/runtime target).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L2.
export type DocsLanguage = {
/** Stable id used in `?lang=`, storage, and tab/page matching (e.g. "node"). */
id: string;
/** Human label for the selector (e.g. "Node.js"). */
label: string;
/** Optional icon key (renderer maps it to a glyph). */
icon?: string;
/**
* Additional spellings that should map to this language id (e.g. `["rb"]` for
* Ruby, `["ts"]` for TypeScript). Matching is case-insensitive.
*/
aliases?: string[];
};
Public export DocsLanguageContextValue.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L3.
export type DocsLanguageContextValue = {
/** The resolved active language id, or null when there is no language concept. */
activeLanguage: string | null;
/** The full language list (empty when unprovided / single-language). */
languages: ReadonlyArray<DocsLanguage>;
/** Switch the active language (persists + reflects into `?lang=`). */
setLanguage: (id: string) => void;
};
Public export DocsLanguageProvider.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L11.
declare const DocsLanguageProvider: import("react").Provider<DocsLanguageContextValue>;
A docs page that may be scoped to a subset of languages.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L74.
export type DocsLanguageScopedPage = {
/** When present, the page only exists for these languages. */
languages?: ReadonlyArray<string> | null;
};
Native `<select>` language switcher — the language analogue of the docs
version selector. Hidden entirely when there are ≤1 languages (a
single-language doc shows no control). Reads/writes through the docs language
context, so it is a drop-in once a `<DocsLanguageProvider>` is in scope.
When any language declares an `icon`, the selector renders a custom
button-list so the icon can appear alongside the label. When no icons are
declared the native `<select>` is used (lighter, more accessible on mobile).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L47.
export declare function DocsLanguageSelector({ className, }?: DocsLanguageSelectorProps): import("react").JSX.Element | null;
Public export DocsLanguageSelectorProps.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L34.
export type DocsLanguageSelectorProps = {
className?: string;
};
A docs code tab — language variants carry a `lang`, aux tabs do not.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L50.
export type DocsLanguageTab = {
label: string;
/**
* The tab's language id. When absent it is derived from the label via
* {@link classifyTabLanguage} (so existing tab shapes need no change).
*/
lang?: string | null;
};
Public export DocsLegal.
Declaration source: packages/farthershore-js/dist/components/docs.d.ts#L9.
export declare function DocsLegal({ docsBaseUrl: docsOverride, productName: nameOverride, className, }?: DocsLegalProps): import("react").JSX.Element;
Public export DocsLegalProps.
Declaration source: packages/farthershore-js/dist/components/docs.d.ts#L1.
export interface DocsLegalProps {
/** Override the resolved docs origin (defaults from the product). */
docsBaseUrl?: string | null;
/** Override the product display name (defaults from the product). */
productName?: string;
/** Appended to the root card. */
className?: string;
}
Public export DocsLinkComponent.
Declaration source: packages/farthershore-js/dist/components/product-docs/navigation.d.ts#L5.
export type DocsLinkComponent = ComponentType<DocsLinkProps>;
Public export DocsLinkProps.
Declaration source: packages/farthershore-js/dist/components/product-docs/navigation.d.ts#L2.
export type DocsLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
href: string;
};
The MDX/markdown component-override map a builder threads into
`<BusinessDocs mdxComponents=… />` (or `<BusinessDocsPageBody>` /
`SafeDocsMarkdown` directly): a map of HTML/markdown tag → React component.
It is `react-markdown`'s `Components` type, surfaced here so a builder types
an override without importing the renderer dependencies directly. Any tag not in the
map keeps its managed rendering (heading anchors, host-router links, copy-able
fenced code).
Declaration source: packages/farthershore-js/dist/components/product-docs/markdown.d.ts#L11.
export type DocsMdxComponents = Components;
Public export DocsMode.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-mode.d.ts#L11.
export type DocsMode = {
kind: DocsModeKind__e089dfaced18;
isEmbedded: boolean;
isStandalone: boolean;
/** Render the brand top bar above the docs (standalone only in SSR). */
showStandaloneHeader: boolean;
/** Render the mobile-nav hamburger (only meaningful for signed-in users). */
showMobileNav: boolean;
/** Props to spread into <BusinessDocsSidebar />. */
sidebar: {
collapsible: boolean;
showSearch: boolean;
showFooter: boolean;
};
/**
* The `view` argument to plumb into productDocsHref / withStandaloneView.
* "standalone" preserves the ?view=standalone query when navigating;
* undefined lets links flow back into the embedded portal.
*/
hrefView: "standalone" | undefined;
/** className for the root .fs-docs element. */
rootClassName: string;
/** className for the empty-state wrapper. */
emptyShellClassName: string;
};
Public export DocsModeInput.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-mode.d.ts#L2.
export type DocsModeInput = {
/** True when the visitor has a portal session (Clerk or persona). */
signedIn: boolean;
/**
* True when ?view=standalone is on the URL. Forces the standalone shell
* even for a signed-in user (used to preview the public-facing docs).
*/
standalonePreview: boolean;
};
Public export DocsNavigate.
Declaration source: packages/farthershore-js/dist/components/product-docs/navigation.d.ts#L6.
export type DocsNavigate = (to: string, opts?: {
replace?: boolean;
}) => void;
The entire portal in one tag. Resolves the product, mounts the `.fs-app`
shell + managed auth, and renders the marketing landing (signed-out) or the
account dashboard (signed-in). Styling lives in the host's CSS; drop to the
standalone components for custom layouts.
W8.7 — the body renders INSIDE the shared {@link FsBootGate } + {@link * composeShell} (the same gate + shell composition <FartherShoreRoot> uses),
so favicon, splash, the resolve-error view, the render-error boundary, and
the automatic preview/test env badge all come for free; `renderDashboard`
stays the only composite-specific knob. Assumes a <FartherShoreProvider> is
already in the tree (the host mounts it, like every other à-la-carte
component).
`renderDashboard` is the chrome escape hatch: when authenticated, the app
renders this instead of the built-in card stack (the default template
supplies its full sidebar app shell this way), still inside the resolved
bootstrap + auth context.
Declaration source: packages/farthershore-js/dist/components/app.d.ts#L23.
export declare function FartherShoreApp({ clerk, renderDashboard, }: {
/** Clerk connection config (public values) for clerk-strategy environments. */
clerk?: FsClerkConfig;
renderDashboard?: (boot: Bootstrap__ecb3d46aafde) => ReactNode;
}): import("react").JSX.Element;
Public export FartherShoreRoot.
Declaration source: packages/farthershore-js/dist/components/root.d.ts#L90.
export declare function FartherShoreRoot({ client, clerk, splash, renderError, renderCrash, envBadge, skipAppShell, skipAuth, skipBootGate, children, }: FartherShoreRootProps): import("react").JSX.Element;
Public export FartherShoreRootProps.
Declaration source: packages/farthershore-js/dist/components/root.d.ts#L7.
export interface FartherShoreRootProps {
client: FartherShoreClient__e4fe174a542f;
/** Clerk connection config for clerk-strategy environments (public values).
* Ignored on persona environments. */
clerk?: FsClerkConfig;
/** Custom splash while the product resolves (default: a minimal one). */
splash?: ReactNode;
/**
* Custom view when the product can't RESOLVE (the bootstrap fetch failed).
* `retry` re-runs the resolve (wired to the bootstrap read's refetch) so a
* transient failure recovers without a full reload. Default: a message.
*/
renderError?: (error: Error, retry: () => void) => ReactNode;
/**
* Custom view when a render throw escapes the gated children (a CRASH, not a
* resolve failure). `reset` clears the boundary so the (now-fixed) subtree
* re-renders. Default: the same message view as `renderError`.
*/
renderCrash?: (error: Error, reset: () => void) => ReactNode;
/**
* The automatic "Test mode" indicator (W8.2). Mounts on a preview/test
* environment (Stripe test mode or a branch-scoped env) with NO developer
* action — opt-OUT by passing `false`, never opt-in. There is no public
* env-management API; the env is read from the injected resolve DTO.
* @default true
*/
envBadge?: boolean;
/** Skip the `.fs-app` wrapper div — for embedding inside a host layout
* that provides its own scoping element. @default false */
skipAppShell?: boolean;
/** Skip mounting the managed {@link FsAuthProvider} — a development-only
* integration escape hatch for hosts bringing their own auth. Sensitive
* component gates remain denied unless the individual gate explicitly
* opts in. @default false */
skipAuth?: boolean;
/** Skip the resolve gate entirely — children render immediately with NO
* {@link BootCtx} above them, so `useBoot()` throws by design (a host that
* owns resolve is expected to supply boot data its own way). @default
* false */
skipBootGate?: boolean;
children: ReactNode;
}
Fetch product docs from the R2 CDN (public origin — no auth).
Declaration source: packages/farthershore-js/dist/components/product-docs/fetch-product-docs.d.ts#L16.
export declare function fetchBusinessDocs(docsBaseUrl: string, options?: FetchBusinessDocsOptions): Promise<BusinessDocsData | null>;
Public export FetchBusinessDocsOptions.
Declaration source: packages/farthershore-js/dist/components/product-docs/fetch-product-docs.d.ts#L6.
export type FetchBusinessDocsOptions = {
envName?: string | null;
};
Public export findBusinessDocsPage.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L63.
export declare function findBusinessDocsPage(index: BusinessDocsIndex, slug: string): BusinessDocsPageEntry | null;
Public export flattenBusinessDocsPages.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L62.
export declare function flattenBusinessDocsPages(index: Pick<BusinessDocsIndex, "navigation" | "collections">): BusinessDocsPageEntry[];
URL fragment trusted platform surfaces append to portal links to request
an immediate silent SSO handshake with the primary domain.
Declaration source: packages/farthershore-js/dist/components/satellite-boot.d.ts#L3.
declare const FS_SSO_FRAGMENT = "#fs-sso";
Track T2 — the invitee's accept surface for the portal `/accept-invite` page.
Reads the token (prop or `?token=`), POSTs it, and reports the outcome. The
signed-in user's email must match the invite (403) — the copy surfaces the
server's reason for the mismatch/expired/used cases.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L85.
export declare function FsAcceptInvite({ className, token: tokenProp, onAccepted, }?: FsAcceptInviteProps): import("react").JSX.Element;
Public export FsAcceptInviteProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L70.
export interface FsAcceptInviteProps {
/** Appended to the root card. */
className?: string;
/** The invitation token. When omitted, it's read from the current URL's
* `?token=` query param (the emailed accept link shape). */
token?: string;
/** Fired after a successful accept (e.g. to navigate to the dashboard). */
onAccepted?: () => void;
}
The one-tag Managed-RBAC management surface: <FsRoleEditor/> (settings +
roles + permission matrix) stacked over <FsMemberRoles/> (the roster with
product-role assignment). Self-managed under <FartherShoreRoot>; renders only
the roster when the product doesn't enable RBAC (the editor hides itself).
A role create/delete in the editor refetches the roster so its product-role
columns stay in sync.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L130.
export declare function FsAccessControl({ className, canManage, canRemove, }?: FsAccessControlProps): import("react").JSX.Element;
Public export FsAccessControlProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L111.
export interface FsAccessControlProps {
/** Appended to the wrapper. */
className?: string;
/** Whether the viewer may mutate settings/roles/assignments. When omitted the
* role editor defaults to the `team:manage_rbac` claim and the roster to the
* viewer's team role; pass an explicit value to gate both off one signal
* (e.g. the template's OWNER/ADMIN derivation). */
canManage?: boolean;
/** Whether the viewer may remove members. Defaults to OWNER only. */
canRemove?: boolean;
}
Track T3 — the managers' request inbox: the pending queue with approve/deny.
Approve AUTO-GRANTS the requested permission (server-side). Self-fetches
`fs.rbac.accessRequests.list()`; renders nothing for non-managers or when the
product doesn't enable RBAC (the list throws a hidden code / 403).
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L110.
export declare function FsAccessRequestsInbox({ className, canManage, }?: FsAccessRequestsInboxProps): import("react").JSX.Element | null;
Public export FsAccessRequestsInboxProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L98.
export interface FsAccessRequestsInboxProps {
/** Appended to the root card. */
className?: string;
/** Whether the viewer may resolve requests. Defaults to false. */
canManage?: boolean;
}
The redesigned self-fetching API-key manager (create form + one-time
reveal + responsive key list). Self-gated on the `api_keys_panel` managed
id — the same policy knob as the scaffold's `ApiKeysPanel`.
Declaration source: packages/farthershore-js/dist/components/api-keys-manager.d.ts#L5.
declare const FsApiKeysManager: typeof FsApiKeysManagerImpl__bbce45124779;
Public export FsAppShell.
Declaration source: packages/farthershore-js/dist/components/app-shell.d.ts#L2.
export declare function FsAppShell({ children }: {
children: ReactNode;
}): import("react").JSX.Element;
Public export FsAuth.
Declaration source: packages/farthershore-js/dist/react/mounted-types.d.ts#L2.
export interface FsAuth {
strategy: AuthStrategy__ccafca0932db;
/** False while auth is initializing (Clerk JS loading / first session read). */
loaded: boolean;
/** True while the page is navigating to the primary domain for the silent
* SSO handshake (an `#fs-sso`-hinted load) — hosts keep their splash up. */
pendingSsoRedirect: boolean;
signedIn: boolean;
/** Clerk → redirect to the primary hosted sign-in (returning here);
* persona → scroll to CLI login guidance. */
signIn(): void;
/** Clerk → redirect to the primary hosted sign-UP (returning here). Use this
* for "Get started"/"Sign up" CTAs; `signIn()` is for "Log in". Strategies
* with no separate registration flow (persona, mock) alias it to signIn. */
signUp(): void;
signOut(): Promise<void>;
/** The signed-in user, normalized to {@link FsAuthUser} (Clerk OR persona),
* or null when signed out. */
user: FsAuthUser__f6ff4488f475 | null;
/** Re-read the session (persona only; Clerk pushes its own state). */
refresh(): void;
/** Managed-RBAC product-role keys assigned to the signed-in user
* (FAR-700), server-resolved from `GET /me` — the SDK never decodes
* tokens client-side. `[]` while auth/permissions load and when signed
* out. */
roles: string[];
/** The user's resolved permission strings (`<route-id>:read|write`
* grammar). Personal orgs / RBAC-off products resolve to `["*"]` (full
* access). `[]` while loading / signed out. */
permissions: string[];
/**
* Whether the signed-in user's permissions grant `key` under the unified
* grammar (`*` / `<subject>:*` / exact — no verb-class widening). Returns
* `false` while permissions load and when signed out.
*
* ⚠️ UX ONLY — hide affordances with it, but the gateway's `permission`
* constraint is the security boundary: a request the user isn't permitted
* to make is denied at the edge regardless of what the client renders.
*/
hasPermission(key: string): boolean;
/** Per-subscriber ComponentAccessPolicy override rows from `GET /me`
* (Wave 5) — consumed by the component-policy resolver so `<PermissionGate
* component=…>` and self-gated SDK components apply the subscriber's
* governed overrides. `[]` while loading / signed out / no overrides. */
componentPolicies: ComponentAccessPolicyRow__60d2c40fe86e[];
/**
* True once the Managed-RBAC claim has settled: the `/me` read answered
* (or failed → deny-defaults locked in), or the viewer is signed out /
* auth finished loading without a session. While false, permission-gated
* UI should render a pending placeholder instead of flashing a deny —
* `usePermissionGate` consumes this so `<PermissionGate>` never flickers.
*/
authzLoaded: boolean;
}
The managed auth layer — mounted by `<FartherShoreRoot>`; mountable directly
by custom roots. Picks the implementation from the environment's strategy.
Omitting it (`skipAuth`) is a development/integration escape hatch, not an
authorization mode; sensitive component gates stay denied by default.
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L92.
export declare function FsAuthProvider({ strategy, clerk, children, }: {
strategy: AuthStrategy__ccafca0932db;
clerk?: FsClerkConfig;
children: ReactNode;
}): import("react").JSX.Element;
The shared boot gate (INTERNAL, PURE): one cached resolve round-trip, the
favicon side-effect, and the {@link BootCtx } that {@link useBoot} reads —
nothing else. Theme, auth, the render-error boundary, and the env badge are
NOT mounted here — {@link composeShell} composes those around the resolved
boot data.
`children` is either plain content or a render function of the resolved
{@link Bootstrap} (so a composite like {@link FartherShoreApp } can read the
resolved product without a second `useBoot()` round-trip). Assumes a
<FartherShoreProvider> is already in the tree — {@link FartherShoreRoot}
mounts one; a composite assumes the host did.
Declaration source: packages/farthershore-js/dist/components/root.d.ts#L70.
export declare function FsBootGate({ splash, renderError, children, }: {
splash?: ReactNode;
renderError?: (error: Error, retry: () => void) => ReactNode;
children: ReactNode | ((boot: Bootstrap__ecb3d46aafde) => ReactNode);
}): import("react").JSX.Element;
Clerk connection config — public values, baked per environment (e.g. from
VITE_CLERK_* vars). `satelliteDomain` defaults to the current host minus its
first label (`aurora.farthershore.io` → `farthershore.io`). Satellite mode
engages only when the full trio resolves; otherwise single-domain Clerk.
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L11.
export interface FsClerkConfig {
publishableKey: string;
signInUrl?: string;
/** The hosted SIGN-UP page. Derived from {@link signInUrl} when the platform
* did not inject one (see {@link deriveSignUpUrl}), so a "Get started" CTA
* works on an already-deployed edge with no new secret. */
signUpUrl?: string;
satelliteDomain?: string;
}
A generic code sample card. Builder-facing and fully content-driven —
see FsCodeSampleProps.
Declaration source: packages/farthershore-js/dist/components/code-sample.d.ts#L13.
export declare function FsCodeSample({ code, title, copyable, className, }: FsCodeSampleProps): import("react").JSX.Element;
Public export FsCodeSampleProps.
Declaration source: packages/farthershore-js/dist/components/code-sample.d.ts#L1.
export interface FsCodeSampleProps {
/** The code to display, rendered verbatim in a <pre><code> block. */
code: string;
/** Optional label shown in the title bar (e.g. a filename). */
title?: string;
/** Show a copy-to-clipboard button in the title bar. Default true. */
copyable?: boolean;
/** Extra class names on the root, alongside `fs-code`. */
className?: string;
}
The org-admin component-gate policy editor: one row per managed component
(plus any `custom:<slug>` component with an existing override), each with a
required-permission picker (fed by the product's derived `fs.rbac.catalog()`)
and a gate-mode select. Self-fetches under <FartherShoreRoot>; renders
nothing without `team:manage_rbac` or when the product doesn't enable RBAC.
Declaration source: packages/farthershore-js/dist/components/component-access-panel.d.ts#L16.
export declare function FsComponentAccessPanel({ className, canManage, }?: FsComponentAccessPanelProps): import("react").JSX.Element | null;
Public export FsComponentAccessPanelProps.
Declaration source: packages/farthershore-js/dist/components/component-access-panel.d.ts#L1.
export interface FsComponentAccessPanelProps {
/** Appended to the root card. */
className?: string;
/** Whether the viewer may edit component policies. Defaults to the signed-in
* member's `team:manage_rbac` claim (`useFsAuth().hasPermission`) — the
* same self-gate the access-control kit uses. Non-managers render nothing. */
canManage?: boolean;
}
Public export FsEnvironmentBanner.
Declaration source: packages/farthershore-js/dist/components/environment-banner.d.ts#L2.
declare const FsEnvironmentBanner: typeof FsEnvironmentBannerImpl__cd0961e9db86;
Public export FsErrorBoundary.
Declaration source: packages/farthershore-js/dist/components/error-boundary.d.ts#L16.
export declare class FsErrorBoundary extends Component<FsErrorBoundaryProps, FsErrorBoundaryState__e52d6cb39c9c> {
state: FsErrorBoundaryState__e52d6cb39c9c;
static getDerivedStateFromError(error: Error): FsErrorBoundaryState__e52d6cb39c9c;
componentDidCatch(error: Error): void;
componentDidUpdate(prev: FsErrorBoundaryProps): void;
private resetKeysChanged;
reset: () => void;
render(): ReactNode;
}
Public export FsErrorBoundaryProps.
Declaration source: packages/farthershore-js/dist/components/error-boundary.d.ts#L2.
export interface FsErrorBoundaryProps {
/** Render the fallback for a caught error. `reset` clears the boundary so the
* (now-fixed) subtree re-renders. */
renderError: (error: Error, reset: () => void) => ReactNode;
/** Side-effect on catch (logging/telemetry). Render stays in `renderError`. */
onError?: (error: Error) => void;
/** When any value here changes (shallow ===), the boundary auto-resets — wire
* a route/page key so navigating away clears the error. */
resetKeys?: ReadonlyArray<unknown>;
children: ReactNode;
}
Business footer: copyright + docs/legal links + platform attribution.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L31.
export declare function FsFooter({ boot: bootOverride, className, }?: FsFooterProps): import("react").JSX.Element | null;
Public export FsFooterProps.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L25.
export interface FsFooterProps {
/** Override the resolved bootstrap (defaults to the cached resolve). */
boot?: Bootstrap__ecb3d46aafde;
className?: string;
}
The product's square mark — platform-managed `iconUrl` data. Placeholder
until an icon is uploaded: the brand dot (`.fs-icon--dot`), colored by the
host's own CSS. Hosts size either shape by targeting `.fs-icon` /
`.fs-icon--dot` under their own wrapper class.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L14.
export declare function FsIcon({ className, alt }?: FsIconProps): import("react").JSX.Element | null;
Public export FsIconProps.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L2.
export interface FsIconProps {
className?: string;
/** Accessible name for icon-only placements (a collapsed sidebar, an
* avatar spot). Default "" — decorative next to a visible product name. */
alt?: string;
}
Track T2 — the subscriber-team invitation piece: a create form (email +
platform role + optional product-role grants) and the pending-invitation list
with revoke. Self-fetches `fs.team.invites.list()` under <FartherShoreRoot>.
Renders nothing for non-managers (canManage=false). The raw token from a
successful create is surfaced once (email is the primary delivery channel).
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L69.
export declare function FsInviteMembers({ className, canManage, availableRoles, }?: FsInviteMembersProps): import("react").JSX.Element | null;
Public export FsInviteMembersProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L48.
export interface FsInviteMembersProps {
/** Appended to the root card. */
className?: string;
/** Whether the viewer may create/revoke invitations. Defaults to false —
* the roster/editor resolve their own manage signal; the template passes
* its OWNER/ADMIN derivation. */
canManage?: boolean;
/** The org's assignable product roles (from the team read's `availableRoles`)
* offered as grant checkboxes on the create form. */
availableRoles?: readonly {
roleKey: string;
name: string;
}[];
}
Catches limits reported via {@link useLimitHandler} and renders the matching
prompt in an accessible modal overlay (`role="dialog"`, focus moved to the
dialog, Escape to dismiss). Plan limits render {@link UpgradePrompt }.
Opt-in: mounting it changes
nothing until something reports a limit.
Declaration source: packages/farthershore-js/dist/components/limit-boundary.d.ts#L37.
export declare function FsLimitBoundary({ children, className }: FsLimitBoundaryProps): import("react").JSX.Element;
Public export FsLimitBoundaryProps.
Declaration source: packages/farthershore-js/dist/components/limit-boundary.d.ts#L25.
export interface FsLimitBoundaryProps {
children: ReactNode;
/** Appended to the overlay root when a prompt is showing. */
className?: string;
}
The product's wordmark — platform-managed `logoUrl` data. Placeholder
until a logo is uploaded: the display name as text (`.fs-logo--text`).
Hosts size/typeset it by targeting `.fs-logo` / `.fs-logo--text` under
their own wrapper class.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L24.
export declare function FsLogo({ className }?: FsLogoProps): import("react").JSX.Element | null;
Public export FsLogoProps.
Declaration source: packages/farthershore-js/dist/components/chrome.d.ts#L15.
export interface FsLogoProps {
className?: string;
}
The member roster with Managed-RBAC assignment: platform-role select
(OWNER/ADMIN/VIEWER), the org's product-role assignment checkboxes,
stale-role warnings, and remove. Self-fetches the team roster + `GET /me`
(to find "self") under <FartherShoreRoot>. A failed team read degrades to a
read-only roster with the server's reason (team-panel precedent).
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L47.
export declare function FsMemberRoles({ className, canManage, canRemove, title, refreshSignal, }?: FsMemberRolesProps): import("react").JSX.Element;
Public export FsMemberRolesProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L25.
export interface FsMemberRolesProps {
/** Appended to the root card. */
className?: string;
/** Whether the viewer may change roles/assignments. Defaults to the viewer's
* team role (OWNER/ADMIN) resolved from the team read. */
canManage?: boolean;
/** Whether the viewer may remove members. Defaults to OWNER only. */
canRemove?: boolean;
/** Heading text. Defaults to "Team members". */
title?: string;
/** Bump this number to force a roster refetch (a sibling role editor uses it
* after a role create/delete so the product-role columns pick up the
* change). Ignored when unchanged / undefined. */
refreshSignal?: number;
}
Per-category email notification preferences (master + category toggles,
optimistic partial PATCH). Self-gated on the `notification_preferences`
managed id.
Declaration source: packages/farthershore-js/dist/components/notification-preferences.d.ts#L5.
declare const FsNotificationPreferences: typeof FsNotificationPreferencesImpl__49ca85217f63;
The pre-subscription choose-a-plan rail (subscribe flow). UNGATED by
design — the viewer has no roles yet (see the allowlist entry).
Declaration source: packages/farthershore-js/dist/components/onboarding-plan-rail.d.ts#L43.
declare const FsOnboardingPlanRail: typeof FsOnboardingPlanRailImpl__92c14436dcce;
Public export FsOnboardingPlanRailProps.
Declaration source: packages/farthershore-js/dist/components/onboarding-plan-rail.d.ts#L2.
export interface FsOnboardingPlanRailProps {
/** The resolve payload (plans + branding + featured plan id). */
boot: Bootstrap__ecb3d46aafde;
/** The org the subscription is being started for (rides the success /
* cancel URLs and the onboarding call). */
selectedOrganizationId: string | null;
/** Free-plan inline activation succeeded — refresh /me and navigate. */
onActivated: () => void;
/** The subscribe call failed. The host receives BOTH the presentable message
* and the original thrown `error`, because the two answer different
* questions: the message is what to show, the error is what HAPPENED. A
* host that needs to react differently to a retired plan id than to a
* payment failure must read `error.code` — matching on the message text
* makes that reaction silently dependent on platform copy. */
onError: (message: string, error: unknown) => void;
/** A free plan's optional one-time auto-created API key — store it for the
* post-activation banner (shown exactly once, never in URLs). */
onAutoApiKey?: (autoApiKey: unknown) => void;
/** Paid-checkout success destination. Absolute or relative to the current
* page. Defaults to the current page, which keeps the SDK root
* router-agnostic. */
successUrl?: string;
/** Paid-checkout cancellation destination. Absolute or relative to the
* current page. Defaults to the current page. */
cancelUrl?: string;
}
The landing's pricing section: heading chrome around the standalone
`<PlansTable/>`.
Declaration source: packages/farthershore-js/dist/components/app.d.ts#L30.
export declare function FsPricing({ className }?: {
className?: string;
}): import("react").JSX.Element;
Track T3 — the requester's view: pick a permission from the product's derived
catalog, add an optional note, and file a request. Shows the member's own
open/resolved requests with their status. Self-fetches the catalog + the
member's requests under <FartherShoreRoot>. Hidden when the product doesn't
enable RBAC (the catalog read throws RBAC_NOT_ENABLED_BY_PRODUCT).
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L97.
export declare function FsRequestAccess({ className }?: FsRequestAccessProps): import("react").JSX.Element | null;
Public export FsRequestAccessProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L86.
export interface FsRequestAccessProps {
/** Appended to the root card. */
className?: string;
}
The Managed-RBAC role editor: org enforcement toggle, default-role picker,
the role list, and the create/edit editor whose permission checkboxes come
from the product's DERIVED `fs.rbac.catalog()` (never authored). Self-fetches
settings/catalog/roles under <FartherShoreRoot>; renders nothing when the
product doesn't enable RBAC or the caller can't read the config.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L24.
export declare function FsRoleEditor({ className, canManage, onRolesChanged, }?: FsRoleEditorProps): import("react").JSX.Element | null;
Public export FsRoleEditorProps.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L5.
export interface FsRoleEditorProps {
/** Appended to the root card. */
className?: string;
/** Whether the viewer may mutate settings/roles. Defaults to the signed-in
* member's `team:manage_rbac` claim (`useFsAuth().hasPermission`). Pass an
* explicit value to gate off a different signal (e.g. the caller's team
* role). Non-managers see the config read-only; a 403 read hides it. */
canManage?: boolean;
/** Fired after any role/settings mutation so a sibling roster can refresh its
* `availableRoles` + stale-key computation. */
onRolesChanged?: () => void;
}
Public export FsSignIn.
Declaration source: packages/farthershore-js/dist/components/sign-in.d.ts#L5.
export declare function FsSignIn({ className }?: FsSignInProps): import("react").JSX.Element;
A managed sign-in button: Clerk → redirect to the primary-domain hosted
sign-in (returning to the current page); persona → scrolls to the sign-in
form. Style with className (defaults to the SDK CTA button).
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L36.
export declare function FsSignInButton({ className, children, }: {
className?: string;
children?: ReactNode;
}): import("react").JSX.Element;
Public export FsSignInProps.
Declaration source: packages/farthershore-js/dist/components/sign-in.d.ts#L1.
export interface FsSignInProps {
/** Appended to the root section. */
className?: string;
}
A managed sign-out button (any strategy).
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L41.
export declare function FsSignOutButton({ className, children, }: {
className?: string;
children?: ReactNode;
}): import("react").JSX.Element;
Full-viewport branded splash (product mark + name, gentle pulse).
Declaration source: packages/farthershore-js/dist/components/splash.d.ts#L2.
export declare function FsSplash(): import("react").JSX.Element;
Public export FsSubscriberStatus.
Declaration source: packages/farthershore-js/dist/components/subscriber-status.d.ts#L9.
declare const FsSubscriberStatus: typeof FsSubscriberStatusImpl__98d87056de79;
Public export FsSubscriberStatusProps.
Declaration source: packages/farthershore-js/dist/components/subscriber-status.d.ts#L1.
export interface FsSubscriberStatusProps {
/** Summary for compact headers, details for account cards, notices for
* scheduled transitions / pending cancellation / active promos. */
variant?: "summary" | "details" | "notices";
/** Appended to the component root. */
className?: string;
}
The one-tag team tab: the dev-portal template's internal /team management
experience (read-only banner + role editor + access-requests inbox + member
roster + component-access policies) WITHOUT the invitation flow. Zero props
under <FartherShoreRoot>; `canManage`/`canRemove` override the claim-derived
gates.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L90.
declare const FsTeam: typeof FsTeamImpl__401952c13e59;
The team tab's access-requests section: the managers' pending-request inbox
with approve/deny. Renders nothing for non-managers or non-RBAC products.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L56.
declare const FsTeamAccessRequestsSection: typeof FsTeamAccessRequestsSectionImpl__5d99c180600c;
Public export FsTeamAccessRequestsSectionProps.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L43.
export interface FsTeamAccessRequestsSectionProps {
/** Appended to the section's root card. */
className?: string;
/** Whether the viewer may resolve requests. Defaults to the signed-in
* member's `team:manage_rbac` claim (the inbox itself defaults to false, so
* the section resolves the claim for it). */
canManage?: boolean;
}
The team tab's component-access section: per-component gate policies
(required permission + gate mode). Self-gates on `team:manage_rbac` and
hides on non-RBAC products, like the role editor.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L70.
declare const FsTeamComponentAccessSection: typeof FsTeamComponentAccessSectionImpl__b91eefd936ec;
Public export FsTeamComponentAccessSectionProps.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L57.
export interface FsTeamComponentAccessSectionProps {
/** Appended to the section's root card. */
className?: string;
/** Whether the viewer may edit component policies. Omitted → the panel's own
* self-gate (the `team:manage_rbac` claim; non-managers render nothing). */
canManage?: boolean;
}
The team tab's roster section: members with platform-role select,
product-role assignment checkboxes, stale-role warnings, and remove.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L42.
declare const FsTeamMembersSection: typeof FsTeamMembersSectionImpl__6330b8d89acb;
Public export FsTeamMembersSectionProps.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L22.
export interface FsTeamMembersSectionProps {
/** Appended to the section's root card. */
className?: string;
/** Whether the viewer may change roles/assignments. Omitted → the roster's
* own team-role derivation (OWNER/ADMIN). */
canManage?: boolean;
/** Whether the viewer may remove members. Omitted → the roster's own
* derivation (OWNER only). */
canRemove?: boolean;
/** Heading text. Defaults to "Team members". */
title?: string;
/** Bump to force a roster refetch (wire a roles section's onRolesChanged to
* a counter and pass it here). */
refreshSignal?: number;
}
Public export FsTeamProps.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L71.
export interface FsTeamProps {
/** Appended to the wrapper. */
className?: string;
/** Whether the viewer may manage the team. Defaults to the signed-in
* member's `team:manage_rbac` claim; pass an explicit value to gate off a
* different signal. Also decides the read-only banner. */
canManage?: boolean;
/** Whether the viewer may remove members. Defaults to the signed-in
* member's `team:remove_member` claim. */
canRemove?: boolean;
}
The team tab's role-based-access section: the Managed-RBAC role editor
(settings toggle + role list + permission matrix). Hides itself entirely
when the editor does (non-RBAC product / caller can't read the config).
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L21.
declare const FsTeamRolesSection: typeof FsTeamRolesSectionImpl__5ad80c7e8f1f;
Public export FsTeamRolesSectionProps.
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L4.
export interface FsTeamRolesSectionProps {
/** Appended to the section's root card. */
className?: string;
/** Whether the viewer may mutate settings/roles. Omitted → the editor's own
* resolution (the `team:manage_rbac` claim, or a proven server-gated
* load). */
canManage?: boolean;
/** Fired after any role/settings mutation (a sibling members section uses it
* to refresh its product-role columns). */
onRolesChanged?: () => void;
}
Per-request usage events table (full column set, truthful status pill).
Self-gated on the same `usage_card` managed id — one policy knob governs
every usage surface.
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L71.
declare const FsUsageEvents: typeof FsUsageEventsImpl__c310f93c9cf0;
Public export FsUsageEventsProps.
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L45.
export interface FsUsageEventsProps {
events: UsageEvent__0652cabf737c[] | null;
/** Cap the rendered rows (the Overview shows the most recent few). */
limit?: number;
ariaLabel?: string;
/** Rendered instead of the table when there are no events. */
emptyState: ReactNode;
/** Show the full-page range selector and CSV export. Compact consumers omit it. */
showControls?: boolean;
/** Controlled selection; the host retains URL/router ownership. */
range?: UsageTimeRange;
onRangeChange?: (range: UsageTimeRange) => void;
/** Authoritative current billing-period bounds returned with usage. */
periodStart?: string | null;
periodEnd?: string | null;
/** Prefix for the downloaded file; defaults to `usage`. */
exportFilenamePrefix?: string;
}
Public export FsUsageLimits.
Declaration source: packages/farthershore-js/dist/components/usage-limits.d.ts#L8.
declare const FsUsageLimits: typeof FsUsageLimitsImpl__c99c2cc3795d;
Public export FsUsageLimitsProps.
Declaration source: packages/farthershore-js/dist/components/usage-limits.d.ts#L1.
export interface FsUsageLimitsProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "Usage limits". */
title?: string;
}
Plan-aware usage summary hero — the ONE presentation of "your usage this
period". Self-gated on the `usage_card` managed id.
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L66.
declare const FsUsageSummary: typeof FsUsageSummaryImpl__fa0561bef1df;
Public export FsUsageSummaryProps.
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L67.
export type FsUsageSummaryProps = Parameters<typeof FsUsageSummaryImpl__fa0561bef1df>[0];
The signed-in account control. Clerk mode → Clerk's <UserButton/> (avatar
menu with manage-account + sign-out) behind a loading skeleton; persona
mode → null (persona chrome is host-routed — render your own pill).
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L100.
export declare function FsUserButton(): import("react").JSX.Element | null;
Public export groupBusinessApiOperations.
Declaration source: packages/farthershore-js/dist/components/product-docs/api-reference.d.ts#L136.
export declare function groupBusinessApiOperations(operations: readonly BusinessApiOperationEntry[], tagOrder?: readonly string[]): Array<{
tag: string;
operations: BusinessApiOperationEntry[];
}>;
Whether a page is visible for the active language. A page with no
`languages` (the common case) is universal — visible for every language and
when no language is selected. A scoped page is visible only when its list
includes the active language (and is hidden when no language is selected,
since it was explicitly scoped).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L85.
export declare function isPageVisibleForLanguage(page: DocsLanguageScopedPage, activeLanguage: string | null): boolean;
Public export isStandaloneView.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-route.d.ts#L15.
export declare function isStandaloneView(view?: string | string[]): boolean;
Render `children` only when the active docs language matches `lang` (a single
id or a comma-separated allow-list). With no active language (single-language
/ unprovided) NOTHING is rendered — `<LangBlock>` is inherently a
multi-language affordance, so it stays inert until a language is chosen.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L59.
export declare function LangBlock({ lang, children }: LangBlockProps): import("react").JSX.Element | null;
Public export LangBlockProps.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L48.
export type LangBlockProps = {
/** One language id or a comma-separated list (e.g. "go,node"). */
lang: string;
children?: ReactNode;
};
Public export LEGAL_ROUTE_PREFIX.
Declaration source: packages/farthershore-js/dist/components/legal-route.d.ts#L1.
declare const LEGAL_ROUTE_PREFIX = "/legal";
Public export LegalConsentGate.
Declaration source: packages/farthershore-js/dist/components/legal-consent-gate.d.ts#L46.
export declare function LegalConsentGate(): import("react").JSX.Element | null;
Link to one legal document's page.
Declaration source: packages/farthershore-js/dist/components/legal-route.d.ts#L3.
export declare function legalDocHref(kind: string): string;
Public export LegalDocument.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L26.
export declare function LegalDocument({ kind, className }: LegalDocumentProps): import("react").JSX.Element;
Public export LegalDocumentProps.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L22.
export interface LegalDocumentProps {
kind: LegalKind__db43d04bc941;
className?: string;
}
Public export LegalIndex.
Declaration source: packages/farthershore-js/dist/components/legal-index.d.ts#L12.
declare const LegalIndex: typeof LegalIndexImpl__19dbad318e95;
Link to the legal index (every published document for the business).
Declaration source: packages/farthershore-js/dist/components/legal-route.d.ts#L5.
export declare function legalIndexHref(): string;
Public export LegalIndexProps.
Declaration source: packages/farthershore-js/dist/components/legal-index.d.ts#L3.
export interface LegalIndexProps {
/** Appended to the default list root. */
className?: string;
/** Host-owned chrome slot. Document discovery remains SDK-owned. */
renderItem?: (document: PublishedLegalDocument, index: number) => ReactNode;
/** Defaults to a plain not-published message. Pass `null` for no output. */
emptyState?: ReactNode;
}
Legal markdown — remark-gfm + heading anchors only, no custom component
map and no code cards (the SSR legal page rendered with remark-gfm +
rehype-slug and nothing else).
Declaration source: packages/farthershore-js/dist/components/product-docs/markdown.d.ts#L56.
export declare function LegalMarkdown({ source }: {
source: string;
}): import("react").JSX.Element;
Public export LegalRoute.
Declaration source: packages/farthershore-js/dist/components/legal-route.d.ts#L6.
export type LegalRoute = {
view: "index";
} | {
view: "document";
kind: string;
};
Public export LimitHandler.
Declaration source: packages/farthershore-js/dist/components/limit-boundary.d.ts#L5.
export interface LimitHandler {
/** Surface the global prompt for a caught plan-limit block. A no-op
* when no {@link FsLimitBoundary} is mounted (so it's always safe to call). */
report(error: LimitLike__19863c6600b0): void;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { LimitNotice }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/limit-notice.d.ts#L16.
declare const LimitNotice: typeof LimitNoticeImpl__e753a55ffa58;
Public export LimitNoticeProps.
Declaration source: packages/farthershore-js/dist/components/limit-notice.d.ts#L1.
export interface LimitNoticeProps {
/** The caught error to render. Anything that is not a usage-limit deny renders
* null.
* (it is a plan affordance, not one of the six usage-limit classes). */
error: unknown;
/** Appended to the root card. */
className?: string;
}
The subscriber-management permission every /me/rbac/* route enforces
(apps/core/src/routes/portal-customer/rbac.ts → `requirePermission(…,
"team:manage_rbac")`). Used as the default editor gate.
Declaration source: packages/farthershore-js/dist/components/access-control.d.ts#L4.
declare const MANAGE_RBAC_PERMISSION = "team:manage_rbac";
Docs/legal render-error boundary — now a thin wrapper over the reusable
{@link FsErrorBoundary }. Keeps the original single-arg `renderError(error)`
signature so existing call sites (the legal page) are unchanged.
Declaration source: packages/farthershore-js/dist/components/product-docs/markdown.d.ts#L32.
export declare function MarkdownErrorBoundary({ renderError, onError, children, }: {
renderError: (error: Error) => ReactNode;
onError?: (error: Error) => void;
children: ReactNode;
}): import("react").JSX.Element;
Plan-aware meter rows — the shared row presentation inside every usage
summary (portal Overview hero, Usage page, Billing current-plan card).
Presentational: callers pass pre-built rows (`format.buildMeterUsageRows`).
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L9.
export declare function MeterUsageRows({ rows }: {
rows: MeterUsageRow__65f0c2813d76[];
}): import("react").JSX.Element | null;
Public export OnboardingView.
Declaration source: packages/farthershore-js/dist/components/onboarding-view.d.ts#L24.
export declare function OnboardingView({ children, signedOut, className, title, reconcileCheckout, onCheckoutReturnConsumed, }?: OnboardingViewProps): import("react").JSX.Element;
Public export OnboardingViewProps.
Declaration source: packages/farthershore-js/dist/components/onboarding-view.d.ts#L2.
export interface OnboardingViewProps {
/** Rendered once the subscriber context resolves (the real app). */
children?: ReactNode;
/** Rendered when the user is signed in but has no subscriber yet (or is
* signed out) — i.e. not the transient billing-setup state. Defaults to
* null. */
signedOut?: ReactNode | ((context: {
refetch: () => void;
}) => ReactNode);
/** Appended to the transient-state card root. */
className?: string;
/** Heading for the transient setup state. Defaults to "Setting up your
* account". */
title?: string;
/** Reconcile a paid checkout return before exposing onboarding again. The
* managed root sets this from its router-agnostic checkout marker. */
reconcileCheckout?: boolean;
/** Called after a successful checkout return has been reconciled and its
* marker removed. Managed roots use this to clear their in-memory marker so
* later organization switches do not replay checkout reconciliation. */
onCheckoutReturnConsumed?: () => void;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { OrgSwitcher }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/org-switcher.d.ts#L22.
declare const OrgSwitcher: typeof OrgSwitcherImpl__e664bc10fc1b;
Public export OrgSwitcherProps.
Declaration source: packages/farthershore-js/dist/components/org-switcher.d.ts#L2.
export interface OrgSwitcherProps {
/** Appended to the root. */
className?: string;
/** Override the org list (default: the SDK org context's organizations). */
contexts?: SubscriptionContext__55ff0ed7dfb5[];
/** Override the active selection (default: the SDK org context's). */
selectedOrganizationId?: string | null;
/** Compact rail variant (avatar-only trigger, side popover). */
collapsed?: boolean;
/** Own the switch (persistence + refresh). Default: the SDK org context's
* `setOrganization` (cache-busting, persisted). */
onSelect?: (organizationId: string) => void;
}
Public export parseBusinessDocsIndex.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L61.
export declare function parseBusinessDocsIndex(source: string): BusinessDocsIndex;
Parse a pathname into a legal route, or `null` when it is not one (so a
host router can fall through to its own pages).
Declaration source: packages/farthershore-js/dist/components/legal-route.d.ts#L16.
export declare function parseLegalRoute(pathname: string): LegalRoute | null;
Reveal `children` only when the signed-in member's resolved permissions
grant the gate's permission. Resolving → aria-busy placeholder (no flash);
denied → per `mode` (hide / disable / readOnly / denied).
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L102.
export declare function PermissionGate({ permission, component, children, mode, fallback, allowSensitiveWithoutAuth, }: PermissionGateProps): import("react").JSX.Element | null;
Public export PermissionGateProps.
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L49.
export interface PermissionGateProps {
/** The required permission — a unified-grammar key (`<subject>:<verb>`,
* e.g. `reports:write`, `apikey:read`; from the product's derived catalog
* or the managed vocabulary). Omit when `component` is given (the policy
* resolver supplies it); providing BOTH lets the explicit permission
* override the resolved one. */
permission?: string;
/** A component id (`plans_table` / `custom:<slug>`): the permission AND the
* default deny render come from the fail-closed component-policy resolver
* (registration → subscriber overlay → managed default → derived; unknown
* ids → denied). */
component?: string;
/** The subtree to reveal when the permission is granted. */
children?: ReactNode;
/**
* How the gate renders on DENY (the contracts gate-mode vocabulary):
* - `hide` (default) — nothing at all: no placeholder, the layout reflows.
* - `disable` — the subtree, genuinely inert: wrapped in a disabled
* `<fieldset>` with `inert`, so form controls disable and nothing is
* focusable/clickable (a REAL disable, not just styling).
* - `readOnly` — the subtree with {@link usePermissionReadOnly} = true;
* permission-aware components render non-editable views.
* - `denied` — the `fallback` node when given, else `<AccessDenied>`
* naming the missing permission.
* Defaults to the component policy's gateMode when `component` is given.
*/
mode?: ComponentGateMode__052103626acf;
/** Custom denied content for `mode="denied"` (typically `<AccessDenied
* requiredPermission={…}>`); also used as the deny render if provided
* with the default `hide` mode. */
fallback?: ReactNode;
/** Explicit development-only opt-in for rendering a sensitive component
* under a bare provider (`skipAuth`). Defaults to false. */
allowSensitiveWithoutAuth?: boolean;
}
The gate's resolved state. `loading` until auth + the RBAC claim settle
(no flash-of-denied-content); then `granted` or `denied`.
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L5.
export type PermissionGateStatus = "loading" | "granted" | "denied";
The pure auth-guard decision (no React, no router). While auth is loading →
`loading`. Once loaded: a public surface (`requireAuth: false`) is always
`allowed`; an auth-required surface is `allowed` for a signed-in user and
`redirecting` (to `redirectTo` ?? "/") for a signed-out one. A signed-in
user missing `requirePermission` → `denied` (fallback, no redirect).
Exported for direct use + unit testing; `useAuthGuard` is the React wrapper.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L46.
export declare function planAuthGuard(input: AuthGuardInput): AuthGuardDecision;
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { PlansTable }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/plans-table.d.ts#L37.
declare const PlansTable: typeof PlansTableImpl__acc7f730968b;
Public export PlansTableProps.
Declaration source: packages/farthershore-js/dist/components/plans-table.d.ts#L3.
export interface PlansTableProps {
/** Eligibility-scoped plan catalog, for example `/me.availablePlans`.
* When omitted, the public product catalog from `usePlans()` is used. */
availablePlans?: Plan__3a8348415fe9[];
/** Current plan used to reduce `availablePlans` to upgrade-only choices.
* Omit to retain the ordinary public-catalog behavior. */
currentPlan?: Plan__3a8348415fe9 | null;
/** Override the featured ("Most Popular") plan; defaults to the product's
* configured featured plan. */
featuredPlanId?: string | null;
/** Appended to the plan-grid root. */
className?: string;
/** Render a custom card in place of the default `<PlanCard>`. `ctx` carries
* `onSubscribe` so a custom card can still trigger checkout. */
renderRow?: (plan: Plan__3a8348415fe9, ctx: {
featured: boolean;
pending: boolean;
onSubscribe: () => void;
index: number;
}) => ReactNode;
/** Optional host-owned heading/chrome rendered only when rows exist. */
renderHeader?: (ctx: {
count: number;
}) => ReactNode;
/** Override the default no-plans message. Pass `null` to render nothing. */
emptyState?: ReactNode;
}
Public export PricingPlanCard.
Declaration source: packages/farthershore-js/dist/components/pricing-plan-card.d.ts#L3.
export declare function PricingPlanCard({ plan, featured, action, docsLink, }: {
plan: Plan__3a8348415fe9;
featured: boolean;
action: ReactNode;
/** The "see the docs" link for usage-priced plans — pass the host router's
* link component; defaults to a plain anchor at /docs. */
docsLink?: ReactNode;
}): import("react").JSX.Element;
Public export productDocsHref.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-route.d.ts#L27.
export declare function productDocsHref(slug: string, defaultSlug?: string | null, view?: "standalone"): string;
One published legal document, as declared in the builder's `legal/` index.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L12.
export interface PublishedLegalDocument extends LegalDocumentReference__0e8dba55b6a6 {
kind: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { RateLimitDisplay }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/rate-limit-display.d.ts#L16.
declare const RateLimitDisplay: typeof RateLimitDisplayImpl__083c8437250b;
Public export RateLimitDisplayProps.
Declaration source: packages/farthershore-js/dist/components/rate-limit-display.d.ts#L1.
export interface RateLimitDisplayProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "API rate limit". */
title?: string;
/** Warn when remaining requests drop to/below this. Defaults to 10. */
warnBelow?: number;
}
Register a builder component's gate policy. Ids are namespaced
`custom:<slug>` (managed ids are also accepted, letting a host re-declare a
managed component's default gate). Throws on a malformed id — a typo'd
registration would otherwise silently resolve DENIED.
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L67.
export declare function registerComponent(registration: ComponentRegistration): void;
The member-removal permission the roster's Remove action maps to (the
template's canRemove derivation).
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L3.
declare const REMOVE_MEMBER_PERMISSION = "team:remove_member";
Override the managed-RBAC claim for one subtree with a request-local `/me`
scope. This is for deliberate default-subscription surfaces (for example the
audit log) that must not mutate the portal's shared organization selection.
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L84.
export declare function RequestScopedFsAuth({ organizationId, children, }: {
organizationId: string | null;
children: ReactNode;
}): import("react").JSX.Element;
Reveal `children` only when the user is signed in (and, when
`requirePermission` is set, holds that Managed-RBAC permission). While auth
loads → `fallback` (aria-busy by default, no flash); signed-out →
`fallback` and, if `onRedirect` is supplied, a call with the redirect
target (the host navigates); permission-denied → `fallback` only (no
redirect — the user is signed in, just under-permissioned). Self-managed
under `<FartherShoreRoot>`.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L110.
export declare function RequireAuth({ children, fallback, requirePermission, redirectTo, onRedirect, }: RequireAuthProps): import("react").JSX.Element;
Public export RequireAuthProps.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L77.
export interface RequireAuthProps {
children?: ReactNode;
/** Rendered while loading, while redirecting (signed-out), or when a
* `requirePermission` check denies. Defaults to an aria-busy placeholder
* so assistive tech announces the pending state and there's no
* flash-of-protected-content. */
fallback?: ReactNode;
/** A Managed-RBAC permission (`<route-id>:read|write`) the subtree
* additionally requires (FAR-700). A signed-in user lacking it gets the
* `fallback` (no redirect). Composes with the existing props: the
* sign-in gate still runs first. UX ONLY — the gateway's `permission`
* constraint is the security boundary, so a hidden control is a
* convenience, never a defense. */
requirePermission?: string;
/** Where a signed-out user should go. Surfaced on the decision so a host
* effect can navigate; `<RequireAuth>` itself never navigates. Defaults
* to "/". */
redirectTo?: string;
/** Fired with the redirect target when the guard decides to redirect — the
* host's navigation hook (router push). Optional: when omitted the component
* just renders the fallback and the host can read the same decision via
* `useAuthGuard`. */
onRedirect?: (redirectTo: string) => void;
}
Resolve the active collection id following the precedence:
explicit route → stored → defaultCollection → collections[0] → null
A candidate only wins when it is actually one of `collections` (an unknown
route segment or a stale stored value is ignored, falling through to the next
source). With no collections at all the result is `null` — the "single
bundle / no collections" sentinel every consumer treats as "render the one
bundle, show no tab bar".
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections.d.ts#L32.
export declare function resolveActiveCollection(input: ResolveActiveCollectionInput): string | null;
Inputs to {@link resolveActiveCollection} — every source is optional.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections.d.ts#L12.
export type ResolveActiveCollectionInput = {
/** Explicit selection from the route (first path segment); highest precedence. */
explicit?: string | null;
/** Last persisted selection (scoped localStorage). */
stored?: string | null;
/** The doc's declared default collection. */
defaultCollection?: string | null;
/** The doc's full collection list. */
collections?: ReadonlyArray<DocsCollection> | null;
};
Resolve the active language id following the precedence:
explicit `?lang=` → stored → defaultLanguage → languages[0] → null
A candidate only wins when it is actually one of `languages` (an unknown
`?lang=` or a stale stored value is ignored, falling through to the next
source). With no languages at all the result is `null` — the "no language
concept" sentinel every consumer treats as "render everything".
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L48.
export declare function resolveActiveLanguage(input: ResolveActiveLanguageInput): string | null;
Inputs to {@link resolveActiveLanguage} — every source is optional.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L29.
export type ResolveActiveLanguageInput = {
/** Explicit selection from the URL (`?lang=`); highest precedence. */
explicit?: string | null;
/** Last persisted selection (scoped localStorage). */
stored?: string | null;
/** The doc's declared default language. */
defaultLanguage?: string | null;
/** The doc's full language list. */
languages?: ReadonlyArray<DocsLanguage> | null;
};
Public export resolveDocsMode.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-mode.d.ts#L36.
export declare function resolveDocsMode(input: DocsModeInput): DocsMode;
Sign-in is strategy-owned, not an application route. Test-persona sessions
are opened by the CLI through the platform-owned bridge; Clerk owns its
hosted redirect. Call `useFsAuth().signIn()` instead of navigating directly.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L76.
export declare function resolveSignInDestination(strategy: AuthStrategy__ccafca0932db): string | null;
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { ResourceLimitUsageCard }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/resource-limit-usage-card.d.ts#L14.
declare const ResourceLimitUsageCard: typeof ResourceLimitUsageCardImpl__b73d0d5d75dd;
Public export ResourceLimitUsageCardProps.
Declaration source: packages/farthershore-js/dist/components/resource-limit-usage-card.d.ts#L1.
export interface ResourceLimitUsageCardProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "Plan usage". */
title?: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { ResourcesPanel }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/resources-panel.d.ts#L21.
declare const ResourcesPanel: typeof ResourcesPanelImpl__0ecc889f1253;
Public export ResourcesPanelProps.
Declaration source: packages/farthershore-js/dist/components/resources-panel.d.ts#L1.
export interface ResourcesPanelProps {
/** The declared resource name (e.g. "widgets"). */
resourceName: string;
/** Build the create payload (defaults to an empty object). */
makePayload?: () => unknown;
/** Render one record's summary (defaults to its id). */
renderItem?: (record: {
id: string;
payload: unknown;
}) => string;
/** Appended to the root card. */
className?: string;
}
Public export RoutePanel.
Declaration source: packages/farthershore-js/dist/components/route-panel.d.ts#L11.
declare const RoutePanel: typeof RoutePanelImpl__b2819b22dcb3;
Public export RoutePanelProps.
Declaration source: packages/farthershore-js/dist/components/route-panel.d.ts#L4.
export interface RoutePanelProps {
/** Initial value for the path input. */
defaultPath?: string;
/** Appended to the root card. */
className?: string;
}
Docs-page markdown with the SafeMDX behavior: a render throw shows the
SSR error card instead of crashing the route. Key the component by page
slug at the call site so the boundary resets on navigation.
`components` (optional) is a builder override map merged OVER the managed
docs component map — so a builder can swap how a `<h2>`, `<a>`, `<code>`,
`<table>`, etc. render while every un-overridden tag keeps its managed
behavior (heading anchors, host-router links, copy-able fenced code).
Declaration source: packages/farthershore-js/dist/components/product-docs/markdown.d.ts#L47.
export declare function SafeDocsMarkdown({ source, components, }: {
source: string;
components?: Components;
}): import("react").JSX.Element;
Partition `tabs` into language variants vs auxiliary tabs and keep only the
active language's variant (plus every aux tab), in original order.
Byte-identical guarantee: if there is ≤1 language tab, OR `activeLanguage`
is `null`, the input is returned UNCHANGED (same array, same order) — a
single-language / no-language page never sees filtering. Otherwise the
active-language tab is kept (falling back to the FIRST language tab when the
active language has no variant here, so the card is never blank), followed by
all aux tabs.
When `languages` is provided it is forwarded to {@link classifyTabLanguage}
so that builder-declared languages (with custom aliases) are recognized.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language.d.ts#L72.
export declare function selectLanguageTabs<T extends DocsLanguageTab>(tabs: ReadonlyArray<T>, activeLanguage: string | null, languages?: ReadonlyArray<DocsLanguage>): ReadonlyArray<T>;
Renders children only when a user is signed in.
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L21.
export declare function SignedIn({ children }: {
children: ReactNode;
}): import("react").JSX.Element | null;
Renders children only when signed out (and auth has finished loading —
nothing flashes during init).
Declaration source: packages/farthershore-js/dist/components/auth.d.ts#L26.
export declare function SignedOut({ children }: {
children: ReactNode;
}): import("react").JSX.Element | null;
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { SpendCapControl }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/spend-cap-control.d.ts#L14.
declare const SpendCapControl: typeof SpendCapControlImpl__efe6f2b0fd95;
Public export SpendCapControlProps.
Declaration source: packages/farthershore-js/dist/components/spend-cap-control.d.ts#L1.
export interface SpendCapControlProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "Monthly spend cap". */
title?: string;
}
Minimal heading shape both renderers share (depth-tagged TOC entries).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/nav-hooks.d.ts#L22.
export type SpyHeading = {
id: string;
depth: number;
};
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { TeamPanel }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/team-panel.d.ts#L14.
declare const TeamPanel: typeof TeamPanelImpl__c348298e2aa6;
Public export TeamPanelProps.
Declaration source: packages/farthershore-js/dist/components/team-panel.d.ts#L1.
export interface TeamPanelProps {
/** Appended to the root card. */
className?: string;
/** Heading text. Defaults to "Team". */
title?: string;
}
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { TrialBanner }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/trial-banner.d.ts#L17.
declare const TrialBanner: typeof TrialBannerImpl__d471bab52484;
Public export TrialBannerProps.
Declaration source: packages/farthershore-js/dist/components/trial-banner.d.ts#L1.
export interface TrialBannerProps {
/** Appended to the root banner. */
className?: string;
/** Optional click handler for the call-to-action (e.g. open the plans page).
* When omitted, no action button is rendered (banner is informational). */
onUpgrade?: () => void;
/** CTA label. Defaults to "Upgrade now". */
upgradeLabel?: string;
}
Remove a registration (host teardown / tests).
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L69.
export declare function unregisterComponent(id: string): void;
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { UpgradePrompt }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L52.
declare const UpgradePrompt: typeof UpgradePromptImpl__8f7c125f9324;
Public export UpgradePromptProps.
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L44.
export type UpgradePromptProps = LimitUpgradePromptProps__0343e0f6f02c | DirectPlanUpgradePromptProps__956ae755c97f;
Exported with its own error boundary: a render throw here shows a contained
"couldn't be displayed" box instead of unmounting the host's page. Wrapped in
THIS module rather than the barrel so `export { UsageCard }` stays a pure
re-export and the components barrel remains tree-shakeable.
Declaration source: packages/farthershore-js/dist/components/usage.d.ts#L22.
declare const UsageCard: typeof UsageCardImpl__1cd3adcc9ade;
Self-managed: with no props it resolves the subscriber's active plan from the
session itself. `activeCompiledPlanId` is an optional override.
Declaration source: packages/farthershore-js/dist/components/usage.d.ts#L7.
export interface UsageCardProps {
/** Override the subscriber's active plan (defaults from the session). */
activeCompiledPlanId?: string | null;
/** Appended to the root card. */
className?: string;
/** Render a custom row in place of the default `.fs-usage__row` markup. */
renderRow?: (row: MeterUsageRow__65f0c2813d76, index: number) => ReactNode;
}
Public export UsageTimeRange.
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L44.
export type UsageTimeRange = "period" | "1d" | "7d" | "30d";
React binding over {@link planAuthGuard}: reads the managed auth state
(`useFsAuth`) and returns the decision. PURE — it does NOT navigate (the host
owns routing); it only (optionally, as a side effect) stashes the return-to
deep link in sessionStorage on a redirecting decision so the host can restore
it after sign-in. Must be used under `<FartherShoreRoot>` / `<FsAuthProvider>`.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L70.
export declare function useAuthGuard(opts: UseAuthGuardOptions): AuthGuardDecision;
Public export UseAuthGuardOptions.
Declaration source: packages/farthershore-js/dist/components/auth-guard.d.ts#L47.
export interface UseAuthGuardOptions {
/** Whether the current surface requires authentication. */
requireAuth: boolean;
/** Where to send a signed-out user. Defaults to "/". */
redirectTo?: string;
/** A Managed-RBAC permission the surface additionally requires (FAR-700).
* Checked via the managed `useFsAuth().hasPermission` — a signed-in user
* lacking it resolves `denied` (fallback, no redirect). UX only; the edge
* `permission` constraint is the security boundary. */
requirePermission?: string;
/** sessionStorage key under which the current location is stashed before a
* redirect, so the host can restore the deep link after sign-in. When set
* (and in a browser), the guard writes `location.pathname + search` on a
* `redirecting` decision. Defaults to "fs-return-to"; pass null to disable. */
returnToKey?: string | null;
}
Headless docs data hook (Tier 3) — fetches current `_index.yaml` → every
page .mdx off `docsBaseUrl` (= boot.business.docsBaseUrl) through the
session-scoped fetch memo (fetchBusinessDocs), keyed by base/env so a
stale resolution is never shown for the current key. Returns
`{ loading, docs }` — `docs` is null while unpublished or after a fetch
failure. This is the single fetch that feeds every connector-fed docs
subcomponent.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L36.
export declare function useBusinessDocs(docsBaseUrl: string | null, envName: string | null): {
loading: boolean;
docs: BusinessDocsData | null;
};
The entire /docs page, headless (Tier 3): route parsing → bootstrap-fed
fetch → embedded/standalone mode → ready/empty/loading state. This is
EXACTLY what `<BusinessDocs/>` renders from — builders composing a custom
docs page get the same orchestration without re-deriving any of it.
Side-effect-free beyond the data fetch: navigation (redirectTo), document
title, and scroll behavior belong to the caller.
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs.d.ts#L126.
export declare function useBusinessDocsPage(input?: BusinessDocsPageInput): BusinessDocsPageResult;
Resolve a COMPONENT id's gate: the fail-closed policy (permission + deny
render) plus its granted/denied status for the signed-in member.
Presentational components resolve `granted` unconditionally; unknown ids or
invalid resolved policies deny regardless of permissions.
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L28.
export declare function useComponentGate(componentId: string): {
status: PermissionGateStatus;
granted: boolean;
policy: ResolvedComponentPolicy__89f6cd2cf9a4;
};
Read the active docs collection. Unprovided → `{ activeCollection: null, … }`.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L12.
export declare function useDocsCollections(): DocsCollectionsContextValue;
Derives the active-collection context value from the route: the URL segment
is the source of truth (see `resolveActiveCollection` precedence), so there is
no separate persisted state — a bare `/docs` falls back to `defaultCollection`
then `collections[0]`. `setCollection` invokes `onSelect` so the host
navigates; the resulting route change re-derives `activeCollection`. SSR-safe:
a pure derivation from props, no window access.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L40.
export declare function useDocsCollectionsState(options: UseDocsCollectionsStateOptions): DocsCollectionsContextValue;
Public export UseDocsCollectionsStateOptions.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/collections-context.d.ts#L13.
export type UseDocsCollectionsStateOptions = {
/** The doc's full collection list. */
collections: ReadonlyArray<DocsCollection>;
/** The doc's declared default collection. */
defaultCollection?: string | null;
/**
* The collection id encoded in the current route (first path segment). The
* URL is the source of truth for this route-bearing axis, so it wins;
* `defaultCollection` then `collections[0]` are the fallbacks for a bare
* `/docs`.
*/
routeCollection?: string | null;
/**
* Called when the user picks a DIFFERENT collection, so the host can navigate
* to its landing page. Keeps this layer router-agnostic (no product-docs /
* router dependency); the route change is what actually flips the active tab.
*/
onSelect?: (collection: DocsCollection) => void;
};
Read the active docs language. Unprovided → `{ activeLanguage: null, … }`.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L13.
export declare function useDocsLanguage(): DocsLanguageContextValue;
Owns the active-language state for a docs surface: resolves the initial value
(explicit `?lang=` → stored → defaultLanguage → languages[0] → null),
persists changes to a scope-namespaced localStorage key, and reflects the
choice into `?lang=` (merging, never clobbering `?v=`/`?view=`). Returns the
context value to feed `<DocsLanguageProvider>`.
SSR-safe: the initial state ignores window on the server (resolves from the
declared default/list only); the explicit/stored sources are merged on the
client in an effect, so the first hydration matches the server snapshot.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L33.
export declare function useDocsLanguageState(options: UseDocsLanguageStateOptions): DocsLanguageContextValue;
Public export UseDocsLanguageStateOptions.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/language-context.d.ts#L14.
export type UseDocsLanguageStateOptions = {
/** The doc's full language list. */
languages: ReadonlyArray<DocsLanguage>;
/** The doc's declared default language. */
defaultLanguage?: string | null;
/** Namespaces the localStorage key so different docs don't share a choice. */
scopeKey?: string | null;
};
Track which h2 (`depth === 2`) heading is currently in view, for the active
sidebar sub-tree highlight. Observes every h2 element by id with a bottom
root-margin so a heading counts as "active" once it scrolls near the top,
and seeds the active id to the first h2 so something is highlighted before
the first scroll. Re-runs when the heading set or `key` (the current slug)
changes. Returns `[activeHeadingId, setActiveHeadingId]` — the setter lets a
sub-tree link mark itself active on click (both renderers do this).
Declaration source: packages/farthershore-js/dist/components/docs-chrome/nav-hooks.d.ts#L35.
export declare function useHeadingSpy(headings: ReadonlyArray<SpyHeading>, key: string): [string | null, Dispatch<SetStateAction<string | null>>];
Public export useLegalConsent.
Declaration source: packages/farthershore-js/dist/components/legal-consent-gate.d.ts#L8.
export declare function useLegalConsent(): UseLegalConsentResult;
Public export UseLegalConsentResult.
Declaration source: packages/farthershore-js/dist/components/legal-consent-gate.d.ts#L2.
export interface UseLegalConsentResult {
required: boolean;
documents: LegalDocumentStatus__f2d5a2d96393[];
accept(kinds: string[]): Promise<void>;
accepting: boolean;
}
Step-per-document consent state.
Submission is batched to the END: the accept API records the whole array in
one transaction with each document's version+contentHash pinned, so the set
is accepted atomically and a mid-wizard content change fails the whole call
(409) instead of leaving a half-consented subscriber. Closing mid-wizard
therefore records nothing and the gate simply reappears.
Declaration source: packages/farthershore-js/dist/components/legal-consent-gate.d.ts#L45.
export declare function useLegalConsentWizard(): UseLegalConsentWizardResult;
Public export UseLegalConsentWizardResult.
Declaration source: packages/farthershore-js/dist/components/legal-consent-gate.d.ts#L9.
export interface UseLegalConsentWizardResult {
/** One step per OUTSTANDING document (already-accepted and `none`-mode
* documents never appear — someone who accepted terms and later gets a new
* policy sees a one-step wizard for just that policy). */
steps: LegalDocumentStatus__f2d5a2d96393[];
index: number;
current: LegalDocumentStatus__f2d5a2d96393 | null;
/** Whether this step's required action has been taken (an `agree` document
* needs its checkbox; an `acknowledge` document is satisfied by advancing). */
canAdvance: boolean;
isLast: boolean;
agreed: Record<string, boolean>;
setAgreed(kind: string, value: boolean): void;
back(): void;
/** Advance a step, or submit EVERY acceptance when on the last one. */
advance(): Promise<void>;
submitting: boolean;
error: string | null;
/** Which way the reader last moved, for hosts that animate the transition.
* `null` on first render and after a restart — the SDK ships no CSS, so
* this is exposed as state (and as `data-fs-legal-direction`) rather than
* animated here. */
direction: "forward" | "back" | null;
/** What the primary control does on THIS step, so a host can style it
* semantically instead of matching on label text. */
primaryAction: "next" | "acknowledge" | "submit";
}
Public export useLegalDocument.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L10.
export declare function useLegalDocument(kind: LegalKind__db43d04bc941): UseLegalDocumentResult;
Public export UseLegalDocumentResult.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L3.
export interface UseLegalDocumentResult {
loading: boolean;
url: string | null;
effectiveDate: string | null;
mdxSource: string | null;
notPublished: boolean;
}
Every legal document the business publishes, in the order Core returns them
(kind-ascending). Empty when the builder authored no `legal/` folder — a
legal document exists ONLY when authored, so surfaces that list documents
(the footer, the `/legal` index) render nothing rather than inventing one.
Declaration source: packages/farthershore-js/dist/components/legal-document.d.ts#L21.
export declare function useLegalDocuments(): PublishedLegalDocument[];
The global limit handler. `report(err)` surfaces the boundary's prompt; with
no boundary mounted it's a no-op, so wiring a `catch` to it is always safe:
Declaration source: packages/farthershore-js/dist/components/limit-boundary.d.ts#L24.
export declare function useLimitHandler(): LimitHandler;
Multi-open accordion state for docs nav groups. The group holding the current
page (`activeGroupTitle`) opens by default, navigating to a page in another
group ADDS that group (never collapsing one the reader opened), and the open
set persists across the per-navigation shell remount via `openGroupsMemory`.
Own this ONCE per shell and share the result across the sidebar + mobile
drawer nav instances — two states writing the shared memory would race
last-writer-wins and drop a group opened in the other pane.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/nav-hooks.d.ts#L20.
export declare function useOpenGroups(activeGroupTitle: string | null): UseOpenGroupsResult;
Public export UseOpenGroupsResult.
Declaration source: packages/farthershore-js/dist/components/docs-chrome/nav-hooks.d.ts#L4.
export type UseOpenGroupsResult = {
/** The currently-expanded group titles. */
openGroups: Set<string>;
/** Toggle one group open/closed (multi-open: never collapses the others). */
toggleGroup: (title: string) => void;
};
The gate state for a MUTATING control (button/form) — `allowed` when the
member's claim grants the write permission, `disabled` while it doesn't
(loading, denied, or rendered inside a `readOnly` gate).
Accepts a component id (`plans_table`, `custom:report-builder` — resolves
the policy's `writePermission`) or a bare permission key (anything with a
`:`, e.g. `apikey:rotate`).
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L45.
export declare function usePermissionAction(componentIdOrPermission: string): {
allowed: boolean;
disabled: boolean;
};
Resolve a required permission against the signed-in member's claim.
Returns `loading` until the auth layer AND the server-resolved permissions
settle, so consumers can hold a pending state instead of flashing a deny.
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L17.
export declare function usePermissionGate(permission: string): {
status: PermissionGateStatus;
/** Convenience: `status === "granted"`. */
granted: boolean;
};
Whether the nearest `<PermissionGate mode="readOnly">` denied its
permission — components render read-only affordances when true.
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L35.
export declare function usePermissionReadOnly(): boolean;
Wrap ANY component in a permission gate — the HOC form for builder
components and route elements. `componentIdOrPermission` follows the
{@link usePermissionAction} convention: contains `:` → a bare permission;
otherwise a component id resolved through the policy resolver.
```tsx
const GatedReports = withGate(ReportsPanel, "custom:reports");
```
Declaration source: packages/farthershore-js/dist/components/permission-gate.d.ts#L113.
export declare function withGate<C extends ComponentType<any>>(Component: C, componentIdOrPermission: string, opts?: {
mode?: ComponentGateMode__052103626acf;
fallback?: ReactNode;
}): C;
Public export withStandaloneView.
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-route.d.ts#L16.
export declare function withStandaloneView(path: string, standalone: boolean): string;
These declarations explain types reachable from the public exports above. They are source evidence, not supported package imports. Suffixed names are documentation identifiers that preserve distinct lexical bindings. Standard-library and third-party types (for example Promise, React and Zod) remain external boundaries; their implementation declarations are not expanded here.
Declaration source: packages/farthershore-js/dist/types.d.ts#L1061.
export interface AccessRequest__e4d3f89daefa {
id: string;
/** External identity id of the requesting member. */
requestedBy: string;
/** The requested permission (unified `<subject>:<verb>` grammar). */
permission: string;
note?: string | null;
/** PENDING | APPROVED | DENIED. */
status: string;
resolvedBy?: string | null;
resolvedAt?: string | null;
createdAt: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L465.
export interface ActiveServiceAccountCreateResponse__b15fda647836 {
status: "ACTIVE";
serviceAccountId: string;
apiKeyId: string;
keyPrefix: string;
/** One-time plaintext secret. */
plaintext: string;
requestedPermissions: string[];
grantedPermissions: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L486.
export interface ActiveServiceAccountUpdateResponse__fe5e8ed2381b {
status: "ACTIVE";
serviceAccountId: string;
requestedPermissions: string[];
grantedPermissions: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L347.
export interface ApiKey__a2eadd893331 {
id: string;
keyPrefix: string;
label: string | null;
/** Normalized lowercase, e.g. "active" | "revoked". */
status: string;
createdAt: string;
lastUsedAt: string | null;
revokedAt: string | null;
/** Consumer-principal (D2): the key's subject kind — a PERSONAL key mints a
* member subject, a SERVICE key an org-owned service account. Always present
* (Core's `ApiKey.kind` is a NOT NULL column). */
kind: ApiKeyKind__336a38a3bc29;
/** PERSONAL — the bound member's stable `Membership.id` (identity + permission
* source). Null for service keys / when the API omits it. */
memberId: string | null;
/** SERVICE — the org-owned `ServiceAccount.id` the key attaches to. Null for
* personal keys / when the API omits it. */
serviceAccountId: string | null;
/** SERVICE — the bound service account's display name, when the API returns
* it (the list groups service keys by account under this label). */
serviceAccountName: string | null;
/** Provenance: which member MINTED the key (audit only; may differ from the
* bound member when an admin mints a personal key for someone — D2a). Null
* for pre-attribution keys. */
createdBy: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L346.
export type ApiKeyKind__336a38a3bc29 = "PERSONAL" | "SERVICE";
Declaration source: packages/farthershore-js/dist/components/keys.d.ts#L5.
declare function ApiKeysPanelImpl__ec7052a86409({ className }?: ApiKeysPanelProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/types.d.ts#L493.
export interface ApprovedServiceAccountCreateResponse__b73a29c4cc94 {
status: "ACTIVE";
operation: "CREATE";
serviceAccountId: string;
apiKeyId: string;
/** One-time plaintext secret. */
plaintext: string;
grantedPermissions: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L502.
export interface ApprovedServiceAccountUpdateResponse__e4e8de0be760 {
status: "ACTIVE";
operation: "UPDATE";
serviceAccountId: string;
grantedPermissions: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L451.
export interface ApproveServiceAccountInput__db09091445e7 {
/** Omit to approve the complete original request. */
grantedPermissions?: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1074.
export interface AuditLogEntry__fed61670ee17 {
id: string;
createdAt: string;
action: string;
decision?: "ALLOW" | "DENY" | null;
actorType?: string | null;
actorUserId?: string | null;
/** Friendly display name for a user actor (subscriber / builder / maker),
* resolved server-side from the actor's Clerk user id. Null for non-user
* actors (gateway / admin_service) or unknown ids — render `actorUserId`
* as the fallback. */
actorName?: string | null;
payloadJson?: Record<string, unknown> | null;
[k: string]: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1089.
export interface AuditLogPage__2bf11a4137e1 {
items: AuditLogEntry__fed61670ee17[];
nextCursor: string | null;
}
Declaration source: packages/farthershore-js/dist/resources/account.d.ts#L142.
export interface AuditLogsResource__99efa1e02380 {
/** Cursor-paged subscriber audit log (decision ALLOW|DENY, limit ≤ 200).
* Degrades to an empty page on error, like the SSR page. */
list(filters?: {
action?: string;
actorUserId?: string;
decision?: "ALLOW" | "DENY";
from?: string;
to?: string;
cursor?: string;
limit?: number;
signal?: AbortSignal;
/**
* `null` intentionally reads the user's default subscription without an
* organization header. `undefined` preserves the selected workspace.
*/
organizationId?: string | null;
}): Promise<AuditLogPage__2bf11a4137e1>;
}
Declaration source: packages/farthershore-js/dist/components/audit-log-table.d.ts#L12.
declare function AuditLogTableImpl__b13b7a55916f({ className, title, organizationId, }?: AuditLogTableProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/resources/auth.d.ts#L3.
export interface AuthResource__beeda8a7af1a {
/** The current session (authenticated identity + a light subscriber slice).
* Resolves to `{ authenticated: false }` on 401/403 rather than throwing.
* Test-persona identity comes from Core's verified HttpOnly cookie; no
* persona bearer is exposed to browser JavaScript. */
getSession(opts?: {
signal?: AbortSignal;
}): Promise<Session__d51a47154738>;
/** Revoke the server-owned persona browser session and clear local auth
* caches. Clerk-strategy environments continue to sign out via Clerk. */
signOut(): Promise<void>;
/** Set a session bearer directly (for example, Clerk's session token). */
setToken(token: string | null): void;
/** Mint a short-lived Gateway bearer from the current authenticated browser
* session. In persona environments Core authenticates this with the
* same-origin HttpOnly cookie. */
gatewayContextToken(opts?: {
signal?: AbortSignal;
refresh?: boolean;
}): Promise<GatewayContextToken__447d2a94e34b>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L59.
export type AuthStrategy__ccafca0932db = "clerk" | "test-personas";
Declaration source: packages/farthershore-js/dist/types.d.ts#L1097.
export interface AutoApiKeyError__bd378e9396dc {
code: string;
message: string;
}
Declaration source: packages/farthershore-js/dist/resources/billing.d.ts#L13.
export interface BillingResource__c8dbd9d25fa3 {
/** The consumer's current subscription for this product, or null.
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached fetch (the cache owns the fetch lifecycle); the read is unmount-safe
* via the hook's active-flag and bounded by the cache TTL. */
subscription(opts?: {
signal?: AbortSignal;
}): Promise<Subscription__3e996fafa8e7 | null>;
/** Open the Stripe-hosted billing portal (payment method + invoices). Returns
* the URL to navigate to. This is also how invoices are viewed in V0. */
openBillingPortal(input?: {
returnUrl?: string;
}): Promise<{
url: string;
}>;
/** Cancel the current subscription. Free subs cancel inline; paid subs are
* scheduled on the provider for the end of the current billing period and
* the result carries the `cancelsAt` boundary. `reason` is recorded for
* churn analytics. */
cancelSubscription(input?: {
reason?: string;
}): Promise<CancelSubscriptionResult__9dfffd11b827>;
/** Buy more prepaid balance. Starts a provider checkout for `amountCents`
* and returns the URL to send the subscriber to. Core gates this on
* `invoice:pay` and refuses (`INVALID_STATE`) for a plan that declares no
* prepaid funding. `requestId` is the idempotency handle — pass the SAME
* uuid to retry one intent; omit it and the SDK mints one per call. */
addFunds(input: {
amountCents: number;
requestId?: string;
successUrl?: string;
cancelUrl?: string;
}): Promise<{
checkoutUrl: string;
}>;
/** Reverse a scheduled cancel — the platform lifts `cancel_at_period_end`
* on the provider (paid) or flips a CANCELLED free sub back to ACTIVE. The
* result carries the platform's POST-restore `cancelAtPeriodEnd` so a
* caller can render the outcome instead of assuming it. */
restoreSubscription(): Promise<RestoreSubscriptionResult__60ac2939c09d>;
/** Change an existing subscription to another plan. Core applies or
* schedules the transition according to the product's policy. */
changePlan(input: {
compiledPlanId: string;
}): Promise<ChangePlanResult__11a914c015a6>;
/** Set (or clear, with `null`) the subscriber's monthly spend cap (in cents).
* PATCHes `/me/spend-cap`. CAVEAT: the cap is currently STORED-not-ENFORCED
* (held in subscription metadata pending the rate-limit migration) — do NOT
* present this as a hard spend limit in UI copy. */
setSpendCap(input: {
maxMonthlySpendCents: number | null;
}): Promise<SpendCapResult__395300e78371>;
/** Read the subscriber's current monthly spend cap (in cents), or null when
* none is set / signed out. P-SPENDCAP-READ — reads the additive
* `subscriber.maxMonthlySpendCents` surfaced on the `/me` context (no new
* route). Joins the memoized `/me` read.
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached `/me` fetch (the cache owns the fetch lifecycle); the read is
* unmount-safe via the hook's active-flag and bounded by the cache TTL. */
getSpendCap(opts?: {
signal?: AbortSignal;
}): Promise<number | null>;
/** The subscriber's current-window bill preview (`GET /me/bill-preview`) —
* computed by Core through the SAME rating engine + ledger state as
* invoicing, so preview === invoice by construction. Honors the plan's
* `spendPolicy.disclosure`: `transparent` carries windows / totals /
* nanodollar allowance balances; `opaque` carries allowance shape only (no
* amounts). Nanodollar fields are decimal STRINGS — format them with
* `format.formatNanos`, never `Number()`. Read-through cached; every
* entitlement mutation (subscribe / change plan / cancel / restore /
* migrate) busts it. Signed-out / no subscription → Core serves an empty
* transparent preview.
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached fetch (the cache owns the fetch lifecycle). */
getBillPreview(opts?: {
signal?: AbortSignal;
}): Promise<BillPreview__c6a85a661e87>;
}
Declaration source: packages/farthershore-js/dist/components/billing.d.ts#L13.
declare function BillingSummaryImpl__8a108aa98a90({ className, slots }?: BillingSummaryProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/types.d.ts#L1284.
export type BillPreview__c6a85a661e87 = TransparentBillPreview__bd44f368bc40 | OpaqueBillPreview__249f4b617b5a;
Declaration source: packages/farthershore-js/dist/types.d.ts#L1198.
export interface BillPreviewAllowance__eba9c1df99be {
/** Bucket source kind (e.g. `included`, `prepaid`, `promo`). */
kind: string;
/** Bucket lifecycle state — Core's `BucketState`, verbatim. */
state: BucketState__c796139d57fe;
/** Nanodollars, decimal strings (null = unavailable). */
remainingNanos: NanosAmount__f9c1e22d3cbe;
heldNanos: NanosAmount__f9c1e22d3cbe;
consumedNanos: NanosAmount__f9c1e22d3cbe;
/** ISO timestamp, or null when the allowance does not expire. */
expiresAt: string | null;
}
Declaration source: packages/farthershore-js/dist/components/bill-preview-card.d.ts#L6.
declare function BillPreviewCardImpl__d0492f0124c1(): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/types.d.ts#L1251.
export interface BillPreviewUsageRating__fb184ad4d633 {
pendingEventCount: number;
unratableEventCount: number;
/** ISO instant of the oldest unaccounted event, or null when there is none. */
oldestUnratedServedAt: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1186.
export interface BillPreviewWindow__ebfec15d43d1 {
windowId: string;
/** ISO timestamps. */
windowStart: string;
windowEnd: string;
/** Rated charges the engine recognized in this window. */
chargeCount: number;
/** Nanodollars, decimal string (null = unavailable). */
ratedNanos: NanosAmount__f9c1e22d3cbe;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L294.
export interface Bootstrap__ecb3d46aafde {
/** Wire schema version of the resolve DTO this bootstrap was decoded from
* (CC5). Additive negotiation hook; legacy payloads (no version) decode as
* `1`. Informational today — the SDK reads every shape tolerantly. */
schemaVersion: number;
business: Business__3ed5dd8f7507;
environment: EnvironmentInfo__866e98cf165d | null;
branding: Branding__c1352d7b32a1;
/** The business's available/purchasable plans (empty when none are
* published). The single source the plans/pricing UI renders from. */
plans: Plan__3a8348415fe9[];
/** The business's active custom-frontend release hash, or null. Informational
* (diagnostics) — V0 serving is host-keyed at the edge. */
frontendReleaseHash: string | null;
/** Available module keys derived from the plan set (non-empty once plans exist):
* e.g. "billing", "usage-quota", "docs", "legal". */
availableModules: string[];
/** The business's declared counted-resource catalog (W5.1). Empty when the
* business declares none. */
declaredResources: DeclaredResource__b4d9315d38c7[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L2.
export interface Branding__c1352d7b32a1 {
displayName: string;
/** Square brand mark (favicon / nav mark). */
iconUrl: string | null;
/** Horizontal text logo (wordmark) — rendered in place of the displayName
* text when set. Most products only have an icon. */
logoUrl: string | null;
/** Marketing/header description for the business, when set. */
description: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1184.
export type BucketState__c796139d57fe = "PENDING" | "AVAILABLE" | "EXPIRY_PENDING" | "FROZEN" | "EXPIRED" | "CANCELLED";
Declaration source: packages/farthershore-js/dist/types.d.ts#L23.
export interface Business__3ed5dd8f7507 {
id: string;
/** Subdomain slug (the first label of the gateway/portal host). */
slug: string;
name: string;
description: string | null;
branding: Branding__c1352d7b32a1;
/** Gateway origin host for builder-feature calls (the business `runtimeHostname`). */
gatewayHost: string;
/** Public portal host. */
portalHost: string;
/** R2 public origin + business prefix where MDX docs live, or null when the
* platform has no docs origin configured (local dev). The `/docs` view
* concatenates the doc filename onto this. */
docsBaseUrl: string | null;
/** R2 public origin + business prefix for per-business legal MDX
* (terms / privacy), or null. The legal view falls back to the platform
* terms notice when null. */
legalBaseUrl: string | null;
/** Versioned legal documents declared by the business, keyed by extensible
* kind (`terms`, `privacy`, custom kinds). URLs are public CDN MDX objects. */
legal?: {
documents: Record<string, LegalDocumentReference__0e8dba55b6a6>;
};
/** Platform-owned docs visibility flag. When `false` the portal /docs
* surface is suppressed (nav item hidden, route 404s) regardless of
* whether `docsBaseUrl` is set. Absent on older Core payloads — the SDK
* defaults this to `true` (backward-compatible). */
docsEnabled: boolean;
/** Immutable `CompiledPlan.id` of the featured plan, or null. Used to render
* the "Most Popular" treatment in the plans UI. */
featuredCompiledPlanId: string | null;
/** Business-level meter definitions — the dimension catalog used to label
* usage rows. Empty when the business declares no meters. */
meters: Meter__c4ca128fcf40[];
}
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-mdx.d.ts#L22.
export type BusinessDocsCodeBlock__2a7a6f0b1817 = {
title: string;
tabs: BusinessDocsCodeTab__e20f813e5fc9[];
method?: string;
endpoint?: string;
status?: string;
latency?: string;
tokens?: string;
cost?: string;
};
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-mdx.d.ts#L17.
export type BusinessDocsCodeTab__e20f813e5fc9 = {
label: string;
code: string;
lang?: string | null;
};
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-mdx.d.ts#L1.
export type BusinessDocsFrontmatter__ceffafa81da1 = {
title?: string;
description?: string;
layout?: "prose" | "codeRail";
previous?: string;
next?: string;
};
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-mdx.d.ts#L8.
export type BusinessDocsHeading__a6d35f30fcdc = {
id: string;
text: string;
depth: 2 | 3;
};
Declaration source: packages/farthershore-js/dist/components/product-docs/product-docs-index.d.ts#L2.
export type BusinessDocsLayout__e9623ab37090 = "prose" | "codeRail";
Declaration source: packages/farthershore-js/dist/resources/business.d.ts#L2.
export interface BusinessResource__933d34c2f16a {
/** The business this frontend is running for (resolved via bootstrap). */
get(): Promise<Business__3ed5dd8f7507>;
/** The business's declared counted-resource catalog (W5.1) — name + label +
* scope + per-plan cap. The same list `bootstrap()` resolves. */
resources(): Promise<DeclaredResource__b4d9315d38c7[]>;
}
Declaration source: packages/farthershore-js/dist/components/cancel-subscription.d.ts#L7.
declare function CancelSubscriptionImpl__11041f19fbf6({ className, onCancelled, }?: CancelSubscriptionProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/types.d.ts#L1122.
export interface CancelSubscriptionResult__9dfffd11b827 {
subscription?: unknown;
/** ISO instant the subscription ends, or null. */
cancelsAt: string | null;
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1144.
export interface ChangePlanResult__11a914c015a6 {
subscription?: unknown;
checkoutUrl?: string | null;
portalRedirect?: {
url: string;
} | null;
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/config.d.ts#L183.
export interface ClientContext__d9dbf3313290 {
/** Platform Core base URL. LAZY: resolved on read as explicit config >
* injected `window.__FS_CONFIG__` > the production platform default —
* never throws. Reading this property is what performs the lazy window
* read; never read it at module scope or client-construction time. */
readonly coreUrl: string;
/** Portal host identifying the product/env to Core. LAZY — see {@link
* coreUrl}; defaults to `location.host` in the browser, read on access. */
readonly portalHost: string | null;
businessId: string | null;
environmentId: string | null;
organizationId: string | null;
/**
* The organization selection before it is reconciled against subscription
* contexts. Unlike `organizationId`, undefined means no explicit selection;
* null is a durable request for the user's default subscription. Internal
* runtime state used by the React organization provider.
*/
organizationSelection?: string | null;
/** Subscribers notified when the imperative organization scope changes. */
organizationListeners: Set<() => void>;
/** Read-through cache backing `fs.prefetch.*` (see cache.ts). */
readCache: Map<string, ReadCacheEntry__ee67854da2b9>;
gatewayUrl: string | null;
apiKey: string | null;
/** Cached short-lived gateway context token for browser-session feature
* calls. Cleared whenever session/org scope changes. */
gatewayContextToken: {
token: string;
expiresAt: string;
cacheKey: string;
} | null;
/** In-flight context-token mint, keyed by cacheKey — SINGLE-FLIGHT coalescing
* so concurrent feature calls share ONE mint instead of stampeding Core
* (W6.3). Cleared as soon as the mint settles. Internal. */
gatewayContextTokenInflight: {
cacheKey: string;
promise: Promise<GatewayContextToken__447d2a94e34b>;
} | null;
/** Explicit session bearer (for Clerk/advanced integrations), falling back
* to the configured `getToken` provider. Persona sessions are HttpOnly
* cookies and never enter JavaScript. */
sessionToken: string | null;
/** True after a cookie-authenticated Core request succeeds. This lets a
* later 401 trigger managed recovery without treating an anonymous first
* `/me` read as a lapsed session. Contains no credential. */
browserSessionAuthenticated: boolean;
getToken?: TokenProvider__40095f0da8e4;
/** Runtime-installed token provider (e.g. the managed Clerk bridge inside
* `<FartherShoreRoot>`). Wins over `config.getToken`; an explicitly set
* `sessionToken` still wins over both. */
tokenProvider: TokenProvider__40095f0da8e4 | null;
fetch: FetchLike__7d89beec4c77;
/** Resolved automatic-retry policy (defaults applied). */
retry: ResolvedRetryConfig__fe2336bea142;
/** Resolved global interceptors (all optional; default no-ops elsewhere). */
onError?: (err: unknown) => void;
onLimitExceeded?: (err: LimitExceededError__7844c601e6fd) => void;
onUnauthorized?: (err: FartherShoreApiError__ae8b4410fda4) => void;
/** Runtime-installed 401 reaction (the managed auth layer's mid-session
* recovery), wired by `<FsAuthProvider>` via `setOnUnauthorized`. Fires AFTER
* the config-level `onUnauthorized`. Internal. */
onUnauthorizedManaged?: (err: FartherShoreApiError__ae8b4410fda4) => void;
/**
* LATCH: managed auth recovery has already fired for the CURRENT credential.
*
* The interceptor de-dupe is per-ERROR-OBJECT, which only collapses one
* logical failure surfacing through nested transports. A dashboard runs many
* independent reads concurrently, so a single lapsed session produces MANY
* distinct 401 errors — each firing its own recovery, each remounting the
* surface, each triggering a fresh round of reads. That feedback loop was
* measured at ~274 requests in 25s from ONE dashboard (~650/min against
* core's 100/min portal limit): the portal rate-limited itself.
*
* Recovery is a per-SESSION event, not a per-request one. Cleared whenever a
* new credential is installed, so a genuinely re-authed session can recover
* again.
*/
managedRecoveryLatched?: boolean;
/** Last `X-RateLimit-*` snapshot observed on a gateway response (W8.5) — fed
* by `fs.route.getWithMeta`, read by `useRouteRateLimit()`. Null until the first
* gateway call that carried the headers. Internal. */
lastRateLimit: RateLimitSnapshot__934527ed940b | null;
/** Subscribers notified when `lastRateLimit` changes (the `useRouteRateLimit`
* external store). Internal. */
rateLimitListeners: Set<() => void>;
/** A5-amend (T11) — the last LIMIT/throttle deny observed leaving the
* transport, recorded by `fireInterceptors`. ADVISORY: the freshest known
* RECENT deny, not a live poll (the gateway stays authoritative). Read by
* `useLimitStatus()`. Null until the first limit deny is observed. Internal. */
lastLimitDeny: ObservedLimitDeny__ff379deca309 | null;
/** Subscribers notified when `lastLimitDeny` changes (the `useLimitStatus`
* external store). Internal. */
limitDenyListeners: Set<() => void>;
/** Subscribers notified when the read cache is BUSTED (auth change, org
* switch, entitlement mutation) — every mounted `useAsync` refetches.
*
* Clearing the cache alone only stops the NEXT read from being served stale;
* it does not re-run the reads already on screen. Without this notification a
* `setSessionToken` after a 401 leaves every mounted surface showing the
* signed-out result until something happens to remount it. Internal. */
readCacheListeners: Set<() => void>;
/** True when all SDK-owned network/auth paths are served by the local mock
* transport. Internal, read by the managed auth layer. */
mockMode: boolean;
}
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L4.
declare const COMPONENT_GATE_MODES__3ef79af50fb5: readonly ["hide", "disable", "readOnly", "denied"];
Declaration source: packages/farthershore-js/dist/types.d.ts#L945.
export interface ComponentAccessPolicyRow__60d2c40fe86e {
/** A managed component id or a `custom:<slug>` key. */
componentKey: string;
/** Override render-gate permission, or null → component default. */
requiredPermission: string | null;
/** Override deny render (`hide|disable|readOnly|denied`), or null →
* component default. */
gateMode: string | null;
}
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L5.
export type ComponentGateMode__052103626acf = (typeof COMPONENT_GATE_MODES__3ef79af50fb5)[number];
Declaration source: packages/farthershore-js/dist/http.d.ts#L3.
export interface CoreRequest__88dbed0693a0 {
method: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
path: string;
query?: Record<string, string | number | undefined | null>;
body?: unknown;
/** Caller-stable retry identity for durable mutation replay. */
idempotencyKey?: string;
/** "session" attaches the consumer session bearer; "none" is for public
* endpoints (resolve/discover). Defaults to "session". */
auth?: "session" | "none";
/** When `false`, a tolerated `401` on this (authed) read does NOT trigger the
* managed auth-layer recovery (`onUnauthorizedManaged` — the hosted-sign-in
* redirect / persona sign-out). Use for best-effort `/me` reads that already
* swallow a 401 and render a signed-out/unsubscribed surface: re-authing an
* already signed-in user can't clear an authorization 401, so the redirect is
* futile and loops. `onUnauthorized` (config hook) + `onError` still fire.
* Defaults to `true` (a lapsed authed session still bounces to recovery). */
recoverAuth?: boolean;
/** Abort signal — when it fires (e.g. a React hook unmounts or its deps
* change), the in-flight read rejects with {@link FartherShoreAbortError}. */
signal?: AbortSignal;
/**
* Per-request organization scope. `undefined` inherits the client selection;
* `null` deliberately omits the organization header without changing that
* shared selection. Use this for APIs whose documented default-subscription
* read is intentionally independent of the workspace currently shown in the
* rest of the portal.
*/
organizationId?: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L375.
export interface CreatedApiKey__eee6ebdc6f61 extends ApiKey__a2eadd893331 {
/** The full key. The platform never returns it again — store it now. */
secret: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L441.
export interface CreateServiceAccountInput__30c268ab08ba {
name: string;
requestedPermissions: NonEmptyPermissionList__ca911cbb6fa0;
scopes?: string[];
usageLimit?: ServiceAccountUsageLimitRequest__f255b800fa4e;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L604.
export type CreateUsageLimitInput__0aee95b69b13 = UsageLimitSubject__9eba54806aaa & UsageLimitValue__4ae5aa5bc7c5 & UsageLimitCreateMode__f16ef2d50497 & {
quantity: string;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L282.
export interface DeclaredResource__b4d9315d38c7 {
name: string;
display?: string;
scope: "subscription" | "subject";
subjectType?: string;
/** Per-plan cap for this resource, when a plan declares one (numeric only). */
cap?: number | null;
}
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L25.
interface DirectPlanUpgradePromptProps__956ae755c97f extends UpgradePromptBaseProps__aaa79a508e5a {
/** A plan already selected by an eligibility-scoped managed plan list. */
plan: Plan__3a8348415fe9;
error?: never;
variant: "button";
/**
* L11 — the subscriber's CURRENT plan, so the CTA can name the DIRECTION of
* the move. `PlansTable` now also offers cheaper plans and the free floor,
* and core applies those at the END of the billing period; labelling every
* one of them "Upgrade" (and implying it is immediate) is a lie. Omit it and
* the CTA falls back to the historic `Upgrade to <name>`.
*/
currentPlan?: Plan__3a8348415fe9 | null;
/** Overrides the direction-derived label. */
label?: string;
/** Called after an inline plan change (never before a redirect). */
onChanged?: (plan: Plan__3a8348415fe9) => void;
onUpgraded?: never;
}
Declaration source: packages/farthershore-js/dist/components/product-docs/docs-mode.d.ts#L1.
export type DocsModeKind__e089dfaced18 = "embedded" | "standalone";
Declaration source: packages/farthershore-js/dist/resources/entitlements.d.ts#L3.
export interface EntitlementSnapshot__78b1daa335cc {
/** True when an ACTIVE subscriber context backed this snapshot. */
hasSubscriber: boolean;
/** Resource limits on the current subscriber's pinned plan. */
resourceLimits: Record<string, number>;
}
Declaration source: packages/farthershore-js/dist/resources/entitlements.d.ts#L16.
export interface EntitlementsResource__eae052f23903 {
/** Read the current subscriber's entitlement maps. Signed-out users get
* empty maps so app code can render disabled/upsell states without a
* separate auth guard. */
snapshot(): Promise<EntitlementSnapshot__78b1daa335cc>;
/** Numeric resource limit, or null when absent. */
resourceLimit(key: string): Promise<number | null>;
/** Per-resource `{ limit, current }` for the pinned plan (`N of M`). The
* LIMIT side lives in the `/me` snapshot, but `current` is a live count, so
* this reads the dedicated `/me/resource-limit-usage` route. Read-through cached
* (the cache owns the fetch lifecycle, like the other `/me` reads — no
* per-caller signal). Signed-out / no subscription → an empty map. */
resourceLimitUsage(): Promise<ResourceLimitUsageMap__cc534f1c9f18>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L85.
export interface EnvironmentInfo__866e98cf165d {
id: string;
name: string;
slug: string;
/** Which sign-in flow the portal should drive: Clerk (production) or a
* platform-owned persona browser session (preview/test envs). */
authStrategy: AuthStrategy__ccafca0932db;
/** Env branch name (preview/test envs), or null for production scope. */
branch: string | null;
/** Billing provider mode for the env: "test" (no real money) or "live".
* Null when the resolve was production-scoped (no env block). The plans UI
* surfaces a "Test mode" badge when this is "test". */
stripeMode: string | null;
}
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L49.
export declare class FartherShoreApiError__ae8b4410fda4 extends FartherShoreError__8dbed6dcc500 {
readonly status: number;
readonly code: string;
readonly body: unknown;
/** Seconds to wait before retrying, parsed from `Retry-After`; null when the
* response carried no `Retry-After`. */
readonly retryAfterSeconds: number | null;
/** The `X-RateLimit-Remaining` / `-Reset` snapshot, or null when absent. */
readonly rateLimit: RateLimitSnapshot__934527ed940b | null;
/**
* Whether the request that produced this error actually carried an auth
* credential (a bearer was attached). Set by the transport AFTER the error is
* minted. A `401` with `authed === false` is a NEVER-authenticated visitor (a
* signed-out `/me` read sent no bearer) — the managed auth layer must treat it
* as a no-op, NOT a lapsed-session redirect. Defaults to `true` so any caller
* that doesn't thread the flag keeps the prior (always-fire) behaviour.
*/
authed: boolean;
/**
* Whether a `401` on this request should trigger the MANAGED auth-layer
* recovery (the hosted-sign-in redirect / persona sign-out). Best-effort `/me`
* reads that already swallow a 401 (and render a signed-out/unsubscribed
* surface) set this `false`: re-authenticating an already signed-in user can
* never clear an authorization 401, so the redirect is futile and loops. Set
* by the transport from `CoreRequest.recoverAuth`. The config-level
* `onUnauthorized` + `onError` hooks STILL fire (observability is unaffected);
* only the managed reaction is gated. Defaults to `true` (always recover).
*/
recoverAuth: boolean;
constructor(status: number, code: string, message: string, body: unknown, retryAfterSeconds?: number | null, rateLimit?: RateLimitSnapshot__934527ed940b | null);
}
Declaration source: packages/farthershore-js/dist/client.d.ts#L36.
export interface FartherShoreClient__e4fe174a542f {
/** The client's resolved runtime context (coreUrl, portalHost, businessId,
* auth/scoping state, …). `coreUrl`/`portalHost` are LAZY getters — reading
* them performs the `window.__FS_CONFIG__`/`location.host` resolution
* (`coreUrl` falls back to the production platform); everything else is a
* live snapshot of the client's current state. Mainly for
* introspection/tests — prefer the typed resources for actual calls. */
readonly context: ClientContext__d9dbf3313290;
/** Resolve + cache the business/env/gateway for the current portal host. Safe
* to call repeatedly (memoized). */
bootstrap(): Promise<Bootstrap__ecb3d46aafde>;
/** Set the consumer API key used for Gateway feature calls. */
setApiKey(key: string | null): void;
/** Set the Core session bearer directly (e.g. from the Clerk browser SDK). */
setSessionToken(token: string | null): void;
/** Install/replace a live token source resolved per request (short-lived
* Clerk JWTs). `<FartherShoreRoot>` wires this automatically in Clerk
* environments; pass null to uninstall. */
setTokenProvider(provider: (() => string | null | Promise<string | null>) | null): void;
/** Rescope subsequent Core calls to an owning org (the multi-org
* subscription-context switcher) — sets the `x-fs-organization-id` header.
* Pass null to return to the user's default subscription. Self-persists the
* choice (restored at the next client creation). */
setOrganizationId(organizationId: string | null): void;
/** The active org id scoping Core calls, or null (the user's default
* subscription). At boot this reflects the persisted choice restored from
* storage; the React org provider seeds its reactive state from it. */
getOrganizationId(): string | null;
/** Imperative organization scope as an external store. This keeps a mounted
* React provider in sync when an application calls `setOrganizationId()`
* directly rather than using the managed org switcher. */
readonly organizationScope?: {
subscribe(listener: () => void): () => void;
};
/** Install/replace the global 401 reaction (fired by the transport on a 401
* for an authed call). `<FartherShoreRoot>` / `<FsAuthProvider>` wire this
* automatically for managed mid-session recovery (persona sign-out / Clerk
* refresh); pass null to uninstall. A config-level `onUnauthorized` still
* fires first. */
setOnUnauthorized(handler: ((err: FartherShoreApiError__ae8b4410fda4) => void) | null): void;
/** Drop every cached Core read (and the short-lived gateway context token), so
* the next `me()` / list call goes to the network. Use after an out-of-band
* state change the SDK can't observe — e.g. polling `me()` for webhook lag to
* settle after returning from a Stripe Checkout (see `reconcileAfterCheckout`). */
invalidate(): void;
/** The last `X-RateLimit-*` snapshot observed on any `fs.route` gateway call,
* with a subscribe primitive — the external store behind `useRouteRateLimit()`
* (W8.5). `get()` is null until the first gateway response carried the
* headers; `subscribe` notifies on every change. */
readonly rateLimit: {
get(): RateLimitSnapshot__934527ed940b | null;
subscribe(listener: () => void): () => void;
};
/** A5-amend (T11) — the last LIMIT/throttle deny observed leaving the
* transport, with a subscribe primitive — the external store behind
* `useLimitStatus()`. ADVISORY (the freshest known RECENT deny, not a live
* poll — the gateway stays authoritative). `get()` is null until the first
* limit deny is observed; `subscribe` notifies on every change. */
readonly limitState: {
get(): ObservedLimitDeny__ff379deca309 | null;
subscribe(listener: () => void): () => void;
};
/** Read-cache invalidation as an external store. `subscribe` fires when a
* change invalidates what is ALREADY on screen: a new session/identity
* (`setSessionToken`, sign-in/sign-out) or a moved entitlement (any billing
* or plan action, and `invalidate()`).
*
* It deliberately does NOT fire on an org switch (org-scoped hooks refetch
* from their own deps) or on an ordinary resource mutation (the hook that
* performed it refetches itself).
*
* Every `useAsync`-backed hook subscribes automatically, so built-in hooks
* and custom ones written against `useAsync` already refetch. Use this
* directly only for state held OUTSIDE a hook (a store, an imperative cache
* of your own) that must be invalidated in step with ours. */
readonly readCache: {
subscribe(listener: () => void): () => void;
};
/** The business this frontend runs for (resolved via bootstrap). */
readonly business: BusinessResource__933d34c2f16a;
/** Consumer session: current identity, server-owned persona logout, and
* short-lived Gateway context-token minting. */
readonly auth: AuthResource__beeda8a7af1a;
/** The consumer's API keys (list / create / revoke / rotate). */
readonly keys: KeysResource__2bf8d8c5e820;
/** Per-dimension usage totals + recent events for this business. */
readonly usage: UsageResource__a3469cda0e70;
/** Subscriber-managed per-actor usage limits. */
readonly usageLimits: UsageLimitsResource__2b1e05e6bcda;
/** The consumer's subscription and Stripe billing portal. */
readonly billing: BillingResource__c8dbd9d25fa3;
/** The business's plan catalog + the subscribe/checkout flow. */
readonly plans: PlansResource__05a484289922;
/** Full subscriber context (`GET /me`): lifecycle, trial, scheduled
* transition, eligibility-scoped plans. Null when signed out / no
* subscriber. */
me(opts?: {
signal?: AbortSignal;
/** `null` omits the organization header without changing the shared
* client selection; `undefined` uses that selection. */
organizationId?: string | null;
}): Promise<SubscriberContext__86c582775b78 | null>;
/** Record legal-document acceptances for the current subscriber/org. */
acceptLegal(acceptances: LegalAcceptance__cc2291cc0442[]): Promise<void>;
/** Multi-org subscription contexts (the org switcher's data). */
readonly organizations: OrganizationsResource__18d4024e64ce;
/** Team management on the current subscription. */
readonly team: TeamResource__b9e413854377;
/** Managed-RBAC management on the current subscription (settings, the
* derived permission catalog, role CRUD) — team-org OWNER/ADMIN only.
* Configures UX + minted-token claims; the EDGE `permission` constraint
* is the security boundary. */
readonly rbac: RbacResource__b63486266173;
/** The subscriber's per-category notification preferences (opt-out model):
* `get` the current state, `update` a partial patch. */
readonly notifications: NotificationsResource__dc7aa1b64a0f;
/** The subscriber-side audit log (cursor-paged). */
readonly auditLogs: AuditLogsResource__99efa1e02380;
/** Current subscriber entitlement maps from the pinned plan version. */
readonly entitlements: EntitlementsResource__eae052f23903;
/** Navigation-intent data warmers — see {@link PrefetchSurface}. */
readonly prefetch: PrefetchSurface__2b22bd2b6c45;
/**
* One-line, zero-config calls to your business's enforced gateway — host,
* auth, surface, and businessId all auto-resolved from the hosted context.
* `fs.route.post("/forecast", { city })`. Limit responses surface as
* `LimitExceededError` so the upgrade prompt works on any call.
*/
readonly route: RouteResource__52eafab15328;
/**
* Typed CRUD over a product-declared, quota-counted resource. Rides the
* gateway (which diverts to core, the system of record); `create` throws
* `LimitExceededError` at the plan cap. `fs.resources("widgets").list()`.
*/
resources<T = unknown>(name: string): ResourcesResource__ef6d17bbf151<T>;
/** Bound named-integration helper: `fs.integration("clerk-admin").fetch(...)`. */
integration(id: string): ManagedIntegration__68b11f8f586e;
/**
* Generic authenticated Core call — the escape hatch for platform endpoints
* the typed resources don't model yet (e.g. a product's `/me/team`,
* `/me/audit-logs`). The Core counterpart to {@link invoke}:
* it attaches the session bearer + the host/env/org scoping headers and maps
* non-2xx to {@link FartherShoreApiError}, exactly like the typed resources —
* the caller only supplies the path and the response type. Prefer a typed
* resource (`fs.usage`, `fs.keys`, …) when one exists.
*/
core<T>(req: CoreRequest__88dbed0693a0): Promise<T>;
}
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L2.
export declare class FartherShoreError__8dbed6dcc500 extends Error {
constructor(message: string);
}
Declaration source: packages/farthershore-js/dist/config.d.ts#L2.
export type FetchLike__7d89beec4c77 = typeof fetch;
Declaration source: packages/farthershore-js/dist/deny-codes.d.ts#L63.
declare const FS_LIMIT_CLASSES__cf69b28be276: readonly ["quota", "rate", "concurrency", "capacity", "spend", "adaptive"];
Declaration source: packages/farthershore-js/dist/components/api-keys-manager.d.ts#L1.
declare function FsApiKeysManagerImpl__bbce45124779(): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/types.d.ts#L789.
export interface FsAuthUser__f6ff4488f475 {
/** Stable user/subscription id, or null when unknown. */
id: string | null;
firstName: string | null;
lastName: string | null;
/** Display name — Clerk's `fullName`, else `first last`, else null. */
fullName: string | null;
/** Primary email — Clerk's `primaryEmailAddress.emailAddress` (nested) or a
* flat `email`, else null. */
email: string | null;
imageUrl: string | null;
/** The original Clerk user or safe persona identity view, untouched. */
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L109.
export interface FsDenyEnvelope__adf7ef9f2448 {
/**
* The semantic class of limit hit — the primary axis clients branch on.
* `null` ONLY when the wire carried a `limitClass` string the SDK's closed
* mirror does NOT know (a FUTURE class added to contracts but not yet shipped
* in this bundle, T13). In that case the raw value is preserved on
* {@link unknownLimitClass} and the whole `_fs` block on {@link raw} so a
* client can still render + introspect the deny, while the SDK refuses to
* invent a known-class facet for it. A KNOWN class is always non-null.
*/
limitClass: FsLimitClass__2d5726601b87 | null;
/**
* T13 — the raw `limitClass` string when it is NOT a member of the closed
* {@link FsLimitClass} mirror (a future/unknown class). Undefined for every
* known class. Lets a forward-compat client surface "a `<unknownLimitClass>`
* limit was hit" + a debug breadcrumb without the SDK guessing semantics.
*/
unknownLimitClass?: string;
/**
* T13 — the raw `_fs` block exactly as it arrived on the wire, preserved for
* debugging/forwarding. Always present (even for a known class) so a developer
* can inspect fields this bundle's typed projection doesn't model yet.
*/
raw?: Record<string, unknown>;
/** The limit's scope when known (e.g. `subscription`, `org`, `route`). */
scope?: string;
/** Actor facet for actor-scoped subscriber limits. Carries kind only; raw
* actor ids must never be present in deny envelopes. */
actorScope?: "member" | "service_account";
/** The metered/resource dimension when known (e.g. `tokens`, `requests`). */
metric?: string;
/** Unix epoch ms when the limit window resets, when known. */
reset?: number;
/** Units remaining in the window at decision time, when known. */
remaining?: number;
/** Units already consumed in the window at decision time, when known. */
used?: number;
/** The cap value (the ceiling that was hit), when known. */
limit?: number;
/** True when retrying the SAME request can succeed (velocity/transient cap). */
retrySafe: boolean;
/** True when the caller must MODIFY the request (reduce size / change plan)
* before it can succeed — the `capacity`/`spend` affordances. */
mustModify: boolean;
/** Provider-supplied reason verbatim, when relayed upstream (an `adaptive`
* throttle). */
providerReason?: string;
/** Whether the platform or an upstream provider decided the limit. */
limitOrigin: FsLimitOrigin__1d4de1805fa7;
/** Human-facing next step for the END USER, when one applies. */
userAction?: string;
/** Human-facing next step for the DEVELOPER/operator, when one applies. */
devAction?: string;
/** The per-attempt request id (correlates with logs/traces). */
requestId?: string;
/** The gateway decision id (correlates with the usage event / audit). */
decisionId?: string;
/** Which exact constraint denied (projects from
* `LimitDecision.blockingConstraintId`); present on a limit deny when known. */
blockingConstraintId?: string;
/** The recommended client reaction. */
reaction: FsLimitReaction__06a9e09be641;
/** Envelope schema version. Bumped on a NON-additive envelope change. */
envelopeVersion?: number;
}
Declaration source: packages/farthershore-js/dist/components/environment-banner.d.ts#L1.
declare function FsEnvironmentBannerImpl__cd0961e9db86(): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/components/error-boundary.d.ts#L13.
interface FsErrorBoundaryState__e52d6cb39c9c {
error: Error | null;
}
Declaration source: packages/farthershore-js/dist/fetch.d.ts#L3.
export interface FsFetchOptions__62afbd421e0f {
/** HTTP method for the upstream call. Defaults to `GET`. */
method?: string;
/** Browser-controlled headers. The named integration allowlists them. */
headers?: Record<string, string>;
/** Browser-controlled query parameters. The named integration allowlists
* each name; secret injection parameters remain server-owned. */
query?: Record<string, string>;
/** Optional, explicitly typed request body. The named integration's bounded
* body declaration is enforced by the gateway. */
body?: {
kind: "json";
value: unknown;
} | {
kind: "text";
value: string;
};
/** Abort signal — cancels the in-flight secure fetch (and the token mint). */
signal?: AbortSignal;
}
Declaration source: packages/farthershore-js/dist/deny-codes.d.ts#L65.
export type FsLimitClass__2d5726601b87 = (typeof FS_LIMIT_CLASSES__cf69b28be276)[number];
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L96.
export type FsLimitOrigin__1d4de1805fa7 = "platform" | "provider" | "subscriber";
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L99.
export type FsLimitReaction__06a9e09be641 = "none" | "backoff_retry" | "wait_then_retry" | "queue" | "reduce_then_retry" | "fallback" | "upgrade";
Declaration source: packages/farthershore-js/dist/components/notification-preferences.d.ts#L1.
declare function FsNotificationPreferencesImpl__49ca85217f63(): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/onboarding-plan-rail.d.ts#L40.
declare function FsOnboardingPlanRailImpl__92c14436dcce({ boot, selectedOrganizationId, onActivated, onError, onAutoApiKey, successUrl, cancelUrl, }: FsOnboardingPlanRailProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/subscriber-status.d.ts#L8.
declare function FsSubscriberStatusImpl__98d87056de79({ variant, className, }?: FsSubscriberStatusProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L51.
declare function FsTeamAccessRequestsSectionImpl__5d99c180600c({ className, canManage, }?: FsTeamAccessRequestsSectionProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L64.
declare function FsTeamComponentAccessSectionImpl__b91eefd936ec({ className, canManage, }?: FsTeamComponentAccessSectionProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L82.
declare function FsTeamImpl__401952c13e59({ className, canManage, canRemove }?: FsTeamProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L37.
declare function FsTeamMembersSectionImpl__6330b8d89acb({ className, canManage, canRemove, title, refreshSignal, }?: FsTeamMembersSectionProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/team.d.ts#L15.
declare function FsTeamRolesSectionImpl__5ad80c7e8f1f({ className, canManage, onRolesChanged, }?: FsTeamRolesSectionProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L63.
declare function FsUsageEventsImpl__c310f93c9cf0({ events, limit, ariaLabel, emptyState, showControls, range, onRangeChange, periodStart, periodEnd, exportFilenamePrefix, }: FsUsageEventsProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/usage-limits.d.ts#L7.
declare function FsUsageLimitsImpl__c99c2cc3795d(props?: FsUsageLimitsProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/usage-surfaces.d.ts#L15.
declare function FsUsageSummaryImpl__fa0561bef1df({ plan, meters, summary, billingBasis, headMeta, billPreview, periodStart, periodEnd, pending, }: {
plan: Plan__3a8348415fe9 | null;
meters: Array<{
key: string;
display: string;
unit?: string;
}>;
summary: Record<string, number>;
billingBasis?: "requests" | "usage";
/** The subscriber's bill preview, when the host reads one. Supplies the
* MONEY allowances ("$60 included · $12.40 used") a funded plan rations in
* — they exist nowhere on the plan or in the usage summary. */
billPreview?: BillPreview__c6a85a661e87 | null;
/** Current billing-period bounds (the usage read returns them), rendered
* through the shared `usagePeriodLabel` so a degenerate window degrades to
* "Since …" rather than printing a zero-length range. */
periodStart?: string | null;
periodEnd?: string | null;
/** The usage read is still in flight.
*
* Without this an empty `summary` renders as a confident "0 / 10,000",
* which is a WRONG number rather than a loading state — the value then
* jumps when the read lands. Prefer showing nothing to showing a zero we
* have not measured. */
pending?: boolean;
/** Extra right-side header content after the rate-limit text (e.g. the
* Overview's "N active keys"). */
headMeta?: ReactNode;
}): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/types.d.ts#L803.
export interface GatewayContextToken__447d2a94e34b {
/** Short-lived `fsc_` bearer accepted by the Gateway for this subscriber. */
token: string;
/** ISO timestamp when the token expires. */
expiresAt: string;
}
Declaration source: packages/farthershore-js/dist/resources/keys.d.ts#L3.
export interface KeysResource__2bf8d8c5e820 {
/** The consumer's API keys for this product (secrets are never returned). */
list(opts?: {
signal?: AbortSignal;
}): Promise<ApiKey__a2eadd893331[]>;
/**
* Create a key. The returned `secret` is shown ONCE.
*
* Consumer-principal (D2): this generic route creates PERSONAL member keys.
* Managed service credentials use the canonical `serviceAccounts` lifecycle,
* which can return PENDING without creating a secret.
*
* `roleKeys` binds the key to org RBAC roles (live-bound: a role edit reaches
* the key without reprovisioning); `restrictedPermissions` optionally narrows
* the bound roles to a Stripe-style subset. Both are grantable only within
* the creator's own permissions — the backend 403s an over-reaching binding.
* (PERSONAL keys ignore `roleKeys` — their perms track the bound member.)
*/
create(input?: {
label?: string;
scopes?: string[];
roleKeys?: string[];
restrictedPermissions?: string[];
kind?: "PERSONAL";
/** PERSONAL — mint FOR this member (their `Membership.id`); admin-gated. */
memberId?: string;
}): Promise<CreatedApiKey__eee6ebdc6f61>;
/** Permanently revoke a key by id. */
revoke(keyId: string): Promise<void>;
/** Rotate a key — revokes the old and returns a new `secret` (shown once). */
rotate(keyId: string): Promise<CreatedApiKey__eee6ebdc6f61>;
/** Canonical managed service-account provisioning and approval lifecycle. */
readonly serviceAccounts: ServiceAccountsResource__abd2dd8a7d4f;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L80.
export interface LegalAcceptance__cc2291cc0442 {
kind: string;
version: string;
contentHash: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L76.
export interface LegalConsentStatus__2c5f3ab016cd {
required: boolean;
documents: LegalDocumentStatus__f2d5a2d96393[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L60.
export type LegalDocumentAcceptanceMode__6e040b71b235 = "agree" | "acknowledge" | "none";
Declaration source: packages/farthershore-js/dist/types.d.ts#L61.
export interface LegalDocumentReference__0e8dba55b6a6 {
title: string;
url: string;
acceptanceMode: LegalDocumentAcceptanceMode__6e040b71b235;
effectiveDate?: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L67.
export interface LegalDocumentStatus__f2d5a2d96393 extends LegalDocumentReference__0e8dba55b6a6 {
kind: string;
version: string;
contentHash: string;
consentLabel?: string;
changeNote?: string;
accepted: boolean;
acceptedAt?: string;
}
Declaration source: packages/farthershore-js/dist/components/legal-index.d.ts#L11.
declare function LegalIndexImpl__19dbad318e95({ className, renderItem, emptyState, }?: LegalIndexProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/components/product-docs/fetch-product-legal.d.ts#L1.
export type LegalKind__db43d04bc941 = "terms" | "privacy" | (string & {});
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L85.
export interface LimitDescriptor__01693492a147 {
/** Stable identifier for the limit that was hit, e.g. `resource:widgets`. */
limitCode: string;
/** The metered/resource dimension, when known (e.g. `widgets`, `requests`). */
dimension: string | null;
/** The cap the subscriber is at, when known. */
currentCapacity: number | null;
}
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L206.
export declare class LimitExceededError__7844c601e6fd extends FartherShoreApiError__ae8b4410fda4 {
readonly limitCode: string;
readonly dimension: string | null;
readonly currentCapacity: number | null;
/** The semantic {@link FsLimitClass} of this limit — derived from the `_fs`
* envelope when present, else from the wire code + limitCode + status
* ({@link classifyFsLimit}). null only when nothing classifies it. */
readonly limitClass: FsLimitClass__2d5726601b87 | null;
/** The parsed `_fs` deny envelope, when the body carried one. The richer
* source for the reaction/headroom fields below. */
readonly envelope: FsDenyEnvelope__adf7ef9f2448 | null;
/** True when retrying the SAME request can succeed (a velocity/transient cap);
* false when it never will (a spend cap / oversized request). */
readonly retrySafe: boolean;
/** True when the caller must MODIFY the request before it can succeed (a
* `capacity` ceiling or `spend` cap). */
readonly mustModify: boolean;
/** The recommended client reaction. */
readonly reaction: FsLimitReaction__06a9e09be641;
/** Whether the platform or an upstream provider decided the limit. */
readonly limitOrigin: FsLimitOrigin__1d4de1805fa7;
/** The gateway decision id (correlates with the usage event / audit), when
* the `_fs` envelope carried one. */
readonly decisionId: string | null;
/** When the limit window resets, when known (from the `_fs` envelope `reset`,
* unix-epoch ms, else the `X-RateLimit-Reset` snapshot). */
readonly reset: Date | null;
/** Units remaining in the window at decision time, when known. */
readonly remaining: number | null;
/** Units already consumed in the window at decision time, when known. */
readonly used: number | null;
/** The cap value hit, when known. */
readonly limit: number | null;
constructor(status: number, code: string, message: string, body: unknown, descriptor: LimitDescriptor__01693492a147, retryAfterSeconds?: number | null, rateLimit?: RateLimitSnapshot__934527ed940b | null);
}
Declaration source: packages/farthershore-js/dist/components/limit-boundary.d.ts#L4.
type LimitLike__19863c6600b0 = LimitExceededError__7844c601e6fd;
Declaration source: packages/farthershore-js/dist/components/limit-notice.d.ts#L9.
declare function LimitNoticeImpl__e753a55ffa58({ error, className }: LimitNoticeProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L8.
interface LimitUpgradePromptProps__0343e0f6f02c extends UpgradePromptBaseProps__aaa79a508e5a {
/** The block to resolve an upgrade for — a plan-limit
* ({@link LimitExceededError})
*/
error: LimitExceededError__7844c601e6fd;
plan?: never;
variant?: "card";
/**
* Called only after a plan change that completed INLINE (no checkout
* redirect). When `changePlan` returns a `checkoutUrl` the upgrade is not yet
* complete — the user is redirected and this does NOT fire.
*/
onUpgraded?: (target: UpgradeTarget__4fa17b7312aa) => void;
onChanged?: never;
label?: never;
currentPlan?: never;
}
Declaration source: packages/farthershore-js/dist/integrations.d.ts#L6.
export type ManagedIntegration__68b11f8f586e = {
fetch(path: string, init?: ManagedIntegrationRequestInit__57e8453840f3): Promise<Response>;
/**
* Fetch-compatible adapter for native SDKs that accept a custom transport.
* Pair it with {@link url}; it converts the SDK's ordinary Request into the
* bounded named-integration envelope without exposing the injected secret.
*/
transport(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
/** Same-origin reserved base URL for native SDKs. It must be paired with this
* handle's `transport`; a raw browser fetch to the URL is not authorized. */
url(path?: string): string;
};
Declaration source: packages/farthershore-js/dist/integrations.d.ts#L3.
export type ManagedIntegrationRequestInit__57e8453840f3 = FsFetchOptions__62afbd421e0f;
Declaration source: packages/farthershore-js/dist/types.d.ts#L15.
export interface Meter__c4ca128fcf40 {
/** Stable dimension key (e.g. "requests", "tokens"). */
key: string;
/** Human-friendly label for the dimension. */
display: string;
/** Optional unit suffix (e.g. "ms", "tokens"). */
unit?: string;
}
Declaration source: packages/farthershore-js/dist/format/catalog-display.d.ts#L226.
export type MeterUsageRow__65f0c2813d76 = {
key: string;
label: string;
used: number;
quota: number | null;
unit?: string;
/** True when the row is a MEASURE the product meters but does NOT publish in
* its served meter catalog (`ocr_pages`, `pages`) rather than a first-class
* meter. Such a row is a breakdown of the metered total, not a peer of it —
* the usage surfaces render it as a secondary line under the meter rows
* instead of as another top-level row. */
secondary?: boolean;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L1179.
export type NanosAmount__f9c1e22d3cbe = string | null;
Declaration source: packages/farthershore-js/dist/types.d.ts#L440.
export type NonEmptyPermissionList__ca911cbb6fa0 = [string, ...string[]];
Declaration source: packages/farthershore-js/dist/types.d.ts#L1164.
export interface NotificationPreferences__f7f3c3495466 {
master: boolean;
categories: Record<string, boolean>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1170.
export interface NotificationPreferencesPatch__73fed684877b {
master?: boolean;
categories?: Record<string, boolean>;
}
Declaration source: packages/farthershore-js/dist/resources/account.d.ts#L169.
export interface NotificationsResource__dc7aa1b64a0f {
/** The current preference state. Missing `master`/`categories` in a partial
* wire response are normalized to the opted-in defaults. */
preferences(opts?: {
signal?: AbortSignal;
}): Promise<NotificationPreferences__f7f3c3495466>;
/** Partial patch — send ONLY the changed channels/categories. Returns the
* full, normalized updated state. */
updatePreferences(patch: NotificationPreferencesPatch__73fed684877b): Promise<NotificationPreferences__f7f3c3495466>;
}
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L580.
export interface ObservedLimitDeny__ff379deca309 {
/** The semantic class, or null for an UNKNOWN/future class (T13). */
limitClass: FsLimitClass__2d5726601b87 | null;
/** The raw `limitClass` string when it is outside the closed mirror (T13). */
unknownLimitClass?: string;
/** The recommended client reaction. */
reaction: FsLimitReaction__06a9e09be641;
/** Whether the platform or an upstream provider decided the deny. */
limitOrigin: FsLimitOrigin__1d4de1805fa7;
/** The provider-supplied reason verbatim, when this relayed an upstream
* throttle (an adaptive deny). */
providerReason: string | null;
/** When the limit window resets, when known. */
reset: Date | null;
/** Units remaining in the window at decision time, when known. */
remaining: number | null;
/** The cap value hit, when known. */
limit: number | null;
/** The HTTP status of the deny. */
status: number;
/** The wire `code` of the deny. */
code: string;
/** The gateway decision id, when known. */
decisionId: string | null;
/** Wall-clock instant (epoch ms) the deny was observed — drives staleness. */
observedAt: number;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L535.
export interface OffsetPage__af8a84ff58be<T> {
data: T[];
pagination: {
limit: number;
offset: number;
hasMore: boolean;
};
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1104.
export interface OnboardingResult__d5ee678fcfed {
checkoutUrl?: string | null;
subscriber?: unknown;
/** One-time full key secret when Core auto-creates the first key. */
autoApiKey?: string | {
secret?: string;
} | null;
/** Set when the first-key mint failed AFTER the subscriber became active —
* surfaced (not swallowed) so the client can tell the user. */
autoApiKeyError?: AutoApiKeyError__bd378e9396dc | null;
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1215.
export type OpaqueAllowanceDisplay__09b08c9319dc = {
kind: "multiplier";
/** Authored allowance in display units (e.g. 5 for a "5x" plan). */
allowanceUnits: number;
/** Remaining allowance in display units, 2 decimals, as a string. */
remainingUnits: string;
/** Consumed allowance in display units, 2 decimals, as a string. */
consumedUnits: string;
} | {
kind: "fraction";
/** Consumed share of the allowance in basis points (0..10000). */
consumedBasisPoints: number;
/** Remaining share of the allowance in basis points (0..10000). */
remainingBasisPoints: number;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L1277.
export interface OpaqueBillPreview__249f4b617b5a {
currency: string;
disclosure: "opaque";
/** The plan's recurring fee, in cents. */
recurringFeeCents: number;
allowances: OpaqueBillPreviewAllowance__c67c601b6f42[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1232.
export interface OpaqueBillPreviewAllowance__c67c601b6f42 {
kind: string;
/** Bucket lifecycle state — Core's `BucketState`, verbatim. */
state: BucketState__c796139d57fe;
expiresAt: string | null;
display: OpaqueAllowanceDisplay__09b08c9319dc;
}
Declaration source: packages/farthershore-js/dist/resources/account.d.ts#L3.
export interface OrganizationsResource__18d4024e64ce {
/** The orgs through which the current user holds subscriptions to this
* product (B2B multi-org). Degrades to the empty shape on any error —
* exactly how the SSR portal treated it. Set `strict` only when a caller
* needs to render the read failure distinctly from a valid empty result. */
contexts(opts?: {
signal?: AbortSignal;
strict?: boolean;
}): Promise<SubscriptionContextsResult__fe44e57e7d49>;
}
Declaration source: packages/farthershore-js/dist/components/org-switcher.d.ts#L15.
declare function OrgSwitcherImpl__e664bc10fc1b({ className, contexts, selectedOrganizationId, collapsed, onSelect, }?: OrgSwitcherProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/types.d.ts#L521.
export interface PendingServiceAccountApproval__5aaaeb81c691 {
id: string;
operation: ServiceAccountApprovalOperation__d422a57b0b16;
serviceAccountId: string;
requestedBy: string;
requestedPermissions: string[];
excessPermissions: string[];
createdAt: string;
serviceAccount: {
name: string;
/** Frozen grants that stay active for a pending UPDATE. */
grantedPermissions: string[];
};
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L455.
export interface PendingServiceAccountCreateResponse__75eae3a7015a {
status: "PENDING";
serviceAccountId: string;
approvalId: string;
requestedPermissions: string[];
/** A pending create has no live credential or frozen authority. */
grantedPermissions: [];
excessPermissions: string[];
eligibleApproverIds: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L476.
export interface PendingServiceAccountUpdateResponse__97b4460d1924 {
status: "PENDING";
serviceAccountId: string;
approvalId: string;
/** Frozen grants that remain active while approval is pending. */
activePermissions: string[];
requestedPermissions: string[];
excessPermissions: string[];
eligibleApproverIds: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L334.
export interface PersonaAuthSession__da61c3cf64e7 {
kind: "test-persona";
personaId: string;
userId: string;
organizationId: string | null;
displayName: string | null;
expiresAt: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L127.
export interface Plan__3a8348415fe9 {
/** Immutable `CompiledPlan.id` — the pointer passed to `subscribe()`. */
id: string;
key: string;
name: string;
description: string | null;
/**
* The builder's DECLARED plan kind. `"free"` is the free tier — a FLOOR,
* not an option: subscribers are auto-enrolled on it at sign-up and fall
* back to it when a paid plan is cancelled, so `<PlansTable>` and every
* other plan-card surface hides it rather than offering it as a choice.
* Read this field — do NOT infer it from a zero recurring fee, which is
* also true of `usage` plans that bill usage.
*/
kind: PlanKind__5f6d46ef299c;
/** Recurring fee, in cents (0 for free / usage plans). */
recurringFeeCents: number;
/** Billing cadence for the recurring fee + metered usage — `"month"`
* (default) or `"year"` (annual). Lets a pricing card render "$X/yr" vs
* "$X/mo" and badge annual tiers. Defaults to `"month"` when the wire DTO
* omits it (the platform omits the key for monthly plans). */
billingInterval: "month" | "year";
/** ISO 4217 currency of every money field on the plan. REQUIRED in the
* normalized model — defaults to `"USD"` when the wire DTO omits it (the
* USD-only platform omits the key today). */
currency: string;
/** Free-trial length in days (0 = no trial). */
trialDays: number;
/** Optional monthly spend cap, in cents. */
maxMonthlySpendCents: number | null;
/** Optional minimum monthly spend floor, in cents. */
minMonthlySpendCents: number | null;
/** Structural metered dimensions (no money). Empty for non-metered plans. */
meters: PlanMeter__be60c6450f51[];
/** Quota + rate-limit rules. Month-window rules are the included allowances. */
limits: PlanLimit__8541d3e44c07[];
/** Optional builder-authored feature bullets shown on the plan card. */
planDetails: string[];
/** Control-plane resource limits — `key → maxCount` caps (webhooks: 5)
* such as api_keys or webhooks. Empty when the
* plan declares none. */
resourceLimits: Record<string, number>;
/**
* The plan's PUBLIC catalog terms for metered usage — the price list a buyer
* needs to compare plans, projected by Core from the served commercial
* release. `null` when the plan binds no catalog, when the served release
* carries no matching pricing policy, or when the builder declared
* `fs.disclosure.opaque`; card surfaces fall back to "priced per the
* catalog" and a docs pointer in that case.
*
* This is the only place on the SDK's plan model where per-unit money lives,
* and it is NOT an exception to the rule the rest of this module states: a
* pricing catalog is a PUBLISHED commerce term the builder authored for
* everyone, whereas a subscriber's rated usage, funding draw-down and
* projected bill remain exclusive to Core's bill preview. The SDK still
* derives NO money: it renders these rates, it never multiplies them by a
* usage count.
*/
pricingDisplay: PlanPricingDisplay__072fcb7dc8b6 | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L232.
export interface PlanFunding__89a4bc119cad {
kind: "included" | "promo" | "referral" | "prepaid";
/** Face value in minor units of {@link PlanPricingDisplay.currency}. */
amountMinor: number;
/** Whether the bucket refreshes each billing period. */
recurs: boolean;
/** The builder's authored marketing framing: the bucket is `factor`x of a
* `baseMinor` base. The base is `amountMinor / factor` by construction, so
* the label cannot misstate the allowance. */
display: {
kind: "multiplier";
factor: number;
baseMinor: number;
} | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L108.
export type PlanKind__5f6d46ef299c = PlanKindWire__a95f9171680c;
Declaration source: packages/farthershore-js/dist/generated/catalog-types.d.ts#L25.
export type PlanKindWire__a95f9171680c = "free" | "flat" | "usage" | "prepaid" | "hybrid" | "trial" | "custom";
Declaration source: packages/farthershore-js/dist/types.d.ts#L111.
export interface PlanLimit__8541d3e44c07 {
dimension: string;
window: {
type: "named";
name: string;
} | {
type: "custom";
seconds: number;
};
capacity: number;
enforcement?: "enforce" | "track";
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L103.
export type PlanMeter__be60c6450f51 = PlanMeterWire__47c3d2492e8a;
Declaration source: packages/farthershore-js/dist/generated/catalog-types.d.ts#L17.
export interface PlanMeterWire__47c3d2492e8a {
dimension: string;
/** Aggregation formula (`linear` sum | `active_count` gauge |
* `event_count` per-event). OPTIONAL — absent means `linear`. */
kind?: "linear" | "active_count" | "event_count";
}
Declaration source: packages/farthershore-js/dist/resources/plans.d.ts#L31.
export interface PlanOffer__5ab47cb32b7d {
/** The immutable CompiledPlan version id (equals `plan.id`). */
compiledPlanId: string;
/** The plan, in the same wire shape as `list()` / the portal catalog. */
plan: Plan__3a8348415fe9;
/** The billing fingerprint of THIS plan version's economic content. Pass it
* to `subscribe()` / `startOnboarding()` as `offerFingerprint` to get a
* 409 PLAN_OFFER_CHANGED instead of a silent price change. */
offerFingerprint: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L248.
export interface PlanPricingDisplay__072fcb7dc8b6 {
/** The pricing policy key the plan's `usagePricing` binds. */
pricingPolicyKey: string;
/** Meter the policy rates. */
meterKey: string;
/** ISO 4217 currency of every amount below. */
currency: string;
/** How the plan binds the catalog. `fixed_version` plans pin `version`. */
binding: {
kind: "current" | "current_with_contract_terms" | "fixed_version";
version: number | null;
};
/** Rates in deterministic precedence order, most specific first. */
rules: PricingRule__391263f593d3[];
/** Funding buckets declared on the plan, in authored order. */
funding: PlanFunding__89a4bc119cad[];
/** What happens when funding runs out: `block` stops requests, `overage`
* keeps serving at the catalog, `prepaid` is the wallet shape. */
exhaustion: "block" | "overage" | "prepaid" | null;
}
Declaration source: packages/farthershore-js/dist/resources/plans.d.ts#L61.
export interface PlansResource__05a484289922 {
/** The product's available plans (resolved via bootstrap). Empty when the
* product has no published, self-serve plans. */
list(): Promise<Plan__3a8348415fe9[]>;
/** The currently-purchasable plan versions for the signed-in subscriber
* (including their pinned plan version), each with the `offerFingerprint`
* to echo back at `subscribe()` for price-change consent. Unlike `list()`,
* this is a live core read (not bootstrap-cached). */
getPlanOffers(): Promise<PlanOffer__5ab47cb32b7d[]>;
/** Start checkout for a plan. Paid → `{ url }` (navigate to Stripe). Free →
* `{ subscriber }` (activated directly). Pass `offerFingerprint` (from
* `getPlanOffers()`) to fail 409 PLAN_OFFER_CHANGED on a stale price. */
subscribe(input: SubscribeInput__62c7cb21d77a): Promise<SubscribeResult__4b2d9557cede>;
/** The dashboard onboarding path (`POST /onboarding`) the SSR portal's
* onboarding view uses. Differs from `subscribe()`: paid plans return
* `checkoutUrl` (not `url`), and free activations may include a one-time
* `autoApiKey` (drives the auto-created-key banner). */
startOnboarding(input?: StartOnboardingInput__af7cf0dea526): Promise<OnboardingResult__d5ee678fcfed>;
}
Declaration source: packages/farthershore-js/dist/components/plans-table.d.ts#L30.
declare function PlansTableImpl__acc7f730968b({ availablePlans, currentPlan, featuredPlanId, className, renderRow, renderHeader, emptyState, }?: PlansTableProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/client.d.ts#L24.
export interface PrefetchSurface__2b22bd2b6c45 {
/** Warm the host→business resolve (joins the memoized bootstrap). */
boot(): void;
/** Warm `GET /me` (subscriber context) for dashboard/account surfaces. */
me(): void;
/** Warm the default usage snapshot (what `<UsageCard>`/the usage page read). */
usage(): void;
/** Warm the API-key list. */
apiKeys(): void;
/** Warm the subscription read (billing surfaces). */
subscription(): void;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L190.
export interface PricingAmount__4680e23fbfac {
num: string;
den: string;
/** `num / den` long-divided; exact where the expansion terminates. */
decimal: string;
/** True when `decimal` was truncated because the rational does not terminate. */
rounded: boolean;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L206.
export type PricingRule__391263f593d3 = {
/** Stable catalog-entry key — the builder's semantic rule id. */
key: string;
/** Measure this rule prices (`pages`, `tokens`). There is no per-measure
* display name anywhere in the commerce manifest, so the unit label a card
* shows is derived from this key. */
measurementKey: string;
/** Catalog-item namespace, when the rule is provider/model scoped. */
item: {
provider: string;
model: string;
modality?: string;
} | null;
/** Dimension conditions that select this rule (`mode = ocr`). */
where: Array<{
dimensionKey: string;
value: string;
}>;
} & ({
kind: "perUnit";
amount: PricingAmount__4680e23fbfac;
} | {
kind: "graduated" | "volume";
tiers: PricingTier__f5519de88c98[];
});
Declaration source: packages/farthershore-js/dist/types.d.ts#L200.
export interface PricingTier__f5519de88c98 {
upTo: string | null;
amount: PricingAmount__4680e23fbfac;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L812.
export type PromoCodeKind__c6690a5a680c = "percent_off" | "amount_off" | "free_months" | (string & {});
Declaration source: packages/farthershore-js/dist/components/rate-limit-display.d.ts#L9.
declare function RateLimitDisplayImpl__083c8437250b({ className, title, warnBelow, }?: RateLimitDisplayProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/errors/index.d.ts#L8.
export interface RateLimitSnapshot__934527ed940b {
/** Requests left in the current window, or null when the header is absent. */
remaining: number | null;
/** When the window resets, or null when the header is absent. The
* `X-RateLimit-Reset` value is unix-epoch SECONDS. */
resetAt: Date | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1053.
export interface RbacCatalogEntry__70378d25cd96 {
subject: string;
/** Optional display title for the subject. */
title?: string;
permissions: string[];
}
Declaration source: packages/farthershore-js/dist/resources/account.d.ts#L65.
export interface RbacResource__b63486266173 {
settings: {
/** Current org settings: `{ enabled, defaultRoleKey? }`. */
get(opts?: {
signal?: AbortSignal;
}): Promise<RbacSettings__15be951cf2e7>;
/** Full-document replace. `enabled: true` seeds the editable
* Admin/Editor/Viewer templates (idempotent); omitted/null
* `defaultRoleKey` clears the default. */
update(input: {
enabled: boolean;
defaultRoleKey?: string | null;
}): Promise<RbacSettings__15be951cf2e7>;
};
/** The DERIVED grantable-permission catalog (never authored) — grouped by
* route operation, in the `<route-id>:read|write` grammar. */
catalog(opts?: {
signal?: AbortSignal;
}): Promise<RbacCatalogEntry__70378d25cd96[]>;
roles: {
/** The org's role list (seeded templates + custom), sorted by key. */
list(opts?: {
signal?: AbortSignal;
}): Promise<RbacRole__8a7d3e5f7c64[]>;
/** Create a custom role. Permissions are validated against the catalog
* (400 `UNKNOWN_PERMISSION` naming offenders; `"*"` always grantable). */
create(input: {
roleKey: string;
name: string;
permissions: string[];
}): Promise<RbacRole__8a7d3e5f7c64>;
/** Rename and/or re-permission a role. */
update(roleKey: string, input: {
name?: string;
permissions?: string[];
}): Promise<RbacRole__8a7d3e5f7c64>;
/** Delete a role. Member assignments referencing it are left in place
* (resolution ignores stale keys); a matching `defaultRoleKey` is
* cleared server-side. */
remove(roleKey: string): Promise<void>;
};
/**
* Permissions Kernel Wave 6 — per-subscriber component gate policies. An
* org admin (team:manage_rbac) upserts one override row per component key;
* `requiredPermission: null` clears the permission override back to the
* component's default. Throws the typed `FartherShoreApiError` — a 409
* `GOVERNED_BY_CHANGE_SET` means change control governs these rows.
*/
componentPolicies: {
/** Upsert the override row for one component key
* (PUT /me/component-policies). */
update(input: {
componentKey: string;
requiredPermission: string | null;
gateMode: string;
}): Promise<ComponentAccessPolicyRow__60d2c40fe86e>;
};
/**
* Track T3 — Notion-minimal access requests. Any member files a request for a
* permission; owners/admins review the queue and approve (AUTO-GRANTS the
* permission onto the requester's direct grants) or deny.
*/
accessRequests: {
/** File a request for a permission. Idempotent on an open PENDING row for
* the same (requester, permission). Any authenticated member. */
create(input: {
permission: string;
note?: string;
}): Promise<AccessRequest__e4d3f89daefa>;
/** The request queue (OWNER/ADMIN): pending first, then resolved. */
list(opts?: {
signal?: AbortSignal;
}): Promise<AccessRequest__e4d3f89daefa[]>;
/** Approve (grants the permission) or deny a pending request. */
resolve(requestId: string, action: "approve" | "deny"): Promise<AccessRequest__e4d3f89daefa>;
};
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1035.
export interface RbacRole__8a7d3e5f7c64 {
roleKey: string;
name: string;
/** Permission strings in the `<subject>:read|write` grammar, or `"*"`. */
permissions: string[];
/** "ACCOUNT" rows are the membership-tier enforcement source: their
* permissions are editable but their identity is fixed — no rename,
* delete, default assignment, or credential binding. Absent ⇒ "CUSTOM". */
kind?: "CUSTOM" | "ACCOUNT";
/** ACCOUNT rows only: the full subscriber vocabulary — the editable
* option set (restoring a removed verb needs the catalog, not just the
* row's current grants). */
vocabulary?: string[];
createdAt?: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1023.
export interface RbacRoleSummary__2161df852611 {
roleKey: string;
name: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1028.
export interface RbacSettings__15be951cf2e7 {
/** Whether role permissions are enforced for this org's user tokens. */
enabled: boolean;
/** Role auto-assigned to members with no explicit assignment. */
defaultRoleKey?: string;
}
Declaration source: packages/farthershore-js/dist/cache.d.ts#L2.
export interface ReadCacheEntry__ee67854da2b9 {
at: number;
promise: Promise<unknown>;
}
Declaration source: packages/farthershore-js/dist/component-policy.d.ts#L73.
export interface ResolvedComponentPolicy__89f6cd2cf9a4 {
componentId: string;
/** Render-gate permission; null ONLY when `presentational`. */
permission: string | null;
/** Every render permission that must pass. Sensitive components include
* their managed default as an AND-floor plus any stricter override. */
requiredPermissions: readonly string[];
/** Permission for the component's mutating affordances. */
writePermission: string;
/** How the component renders when the viewer lacks `permission`. */
gateMode: ComponentGateMode__052103626acf;
/** Where `gateMode` came from: an explicit host registration, a
* subscriber-org overlay, or the platform default. Hosts that wrap a
* component-gated surface (e.g. a route) must not force their own mode
* when the source is not `"default"` — the configured choice wins. */
gateModeSource: "registration" | "overlay" | "default";
/** Renders ungated (explicit flag only). */
presentational: boolean;
/** Whether the id is one of the contracts-owned sensitive components. */
sensitive: boolean;
/** True when the id or its resolved permission policy is invalid: render
* DENIED before evaluating any permission claim. */
unknown: boolean;
}
Declaration source: packages/farthershore-js/dist/config.d.ts#L29.
export interface ResolvedRetryConfig__fe2336bea142 {
maxAttempts: number;
retryOn: (err: unknown) => boolean;
respectRetryAfter: boolean;
sleep: (ms: number) => Promise<void>;
}
Declaration source: packages/farthershore-js/dist/resources/entitlements.d.ts#L10.
export interface ResourceLimitUsage__a2c3c3e2955a {
limit: number;
current: number;
}
Declaration source: packages/farthershore-js/dist/components/resource-limit-usage-card.d.ts#L7.
declare function ResourceLimitUsageCardImpl__b73d0d5d75dd({ className, title, }?: ResourceLimitUsageCardProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/resources/entitlements.d.ts#L15.
export type ResourceLimitUsageMap__cc534f1c9f18 = Record<string, ResourceLimitUsage__a2c3c3e2955a>;
Declaration source: packages/farthershore-js/dist/resources/resources.d.ts#L10.
export interface ResourceRecord__87f0c814eb51<TPayload = unknown> {
id: string;
resource: string;
payload: TPayload;
createdAt: string;
updatedAt: string;
}
Declaration source: packages/farthershore-js/dist/resources/resources.d.ts#L6.
export type ResourceRequestInit__06eb38c7f26b = RouteRequestInit__7377dee5c3ef & {
subjectId?: string;
};
Declaration source: packages/farthershore-js/dist/components/resources-panel.d.ts#L14.
declare function ResourcesPanelImpl__0ecc889f1253({ resourceName, makePayload, renderItem, className, }: ResourcesPanelProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/resources/resources.d.ts#L25.
export interface ResourcesResource__ef6d17bbf151<TPayload = unknown> {
/** List this subscriber's records of the resource. */
list(init?: ResourceRequestInit__06eb38c7f26b): Promise<ResourceRecord__87f0c814eb51<TPayload>[]>;
/** Fetch one record by id. */
get(id: string, init?: ResourceRequestInit__06eb38c7f26b): Promise<ResourceRecord__87f0c814eb51<TPayload>>;
/** Create a record. Throws `LimitExceededError` (402) at the plan cap. */
create(payload: TPayload, init?: ResourceRequestInit__06eb38c7f26b): Promise<ResourceRecord__87f0c814eb51<TPayload>>;
/** Replace a record's payload. */
update(id: string, payload: TPayload, init?: ResourceRequestInit__06eb38c7f26b): Promise<ResourceRecord__87f0c814eb51<TPayload>>;
/** Delete a record (frees one unit of the quota). */
delete(id: string, init?: ResourceRequestInit__06eb38c7f26b): Promise<void>;
/** Authoritative `{ count, cap }` for this resource on the caller's
* subscription (W5.2). Reads core (the system of record), so it works for
* backend-managed resources the SDK can't `list()`. Signed-out / no
* subscription → `{ count: 0, cap: null }`. */
count(init?: {
signal?: AbortSignal;
subjectId?: string;
}): Promise<ResourceUsage__40697d865d06>;
}
Declaration source: packages/farthershore-js/dist/resources/resources.d.ts#L21.
export interface ResourceUsage__40697d865d06 {
count: number;
cap: number | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1134.
export interface RestoreSubscriptionResult__60ac2939c09d {
subscription?: unknown;
/** The platform's post-restore reading. `false` is the success signal; the
* field is `null` only when Core's response carried no subscription state
* to read it from — never guessed. */
cancelAtPeriodEnd: boolean | null;
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/components/route-panel.d.ts#L10.
declare function RoutePanelImpl__b2819b22dcb3({ defaultPath, className, }?: RoutePanelProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/resources/route.d.ts#L2.
export type RouteRequestInit__7377dee5c3ef = RequestInit & {
apiKey?: string;
};
Declaration source: packages/farthershore-js/dist/resources/route.d.ts#L15.
export interface RouteResource__52eafab15328 {
/** Raw gateway call — returns the `Response` for any content type. */
fetch(path: string, init?: RouteRequestInit__7377dee5c3ef): Promise<Response>;
/** `GET path` → parsed JSON. */
get<T = unknown>(path: string, init?: RouteRequestInit__7377dee5c3ef): Promise<T>;
/** `GET path` → parsed JSON PLUS the `X-RateLimit-*` snapshot read off the
* live response before it's discarded (W8.5). Also publishes the snapshot to
* `useRouteRateLimit()`. */
getWithMeta<T = unknown>(path: string, init?: RouteRequestInit__7377dee5c3ef): Promise<RouteResponseMeta__0abf9098561d<T>>;
/** `POST path` with a JSON body → parsed JSON. */
post<T = unknown>(path: string, body?: unknown, init?: RouteRequestInit__7377dee5c3ef): Promise<T>;
/** `PUT path` with a JSON body → parsed JSON. */
put<T = unknown>(path: string, body?: unknown, init?: RouteRequestInit__7377dee5c3ef): Promise<T>;
/** `PATCH path` with a JSON body → parsed JSON. */
patch<T = unknown>(path: string, body?: unknown, init?: RouteRequestInit__7377dee5c3ef): Promise<T>;
/** `DELETE path` → parsed JSON (or undefined on 204). */
delete<T = void>(path: string, init?: RouteRequestInit__7377dee5c3ef): Promise<T>;
}
Declaration source: packages/farthershore-js/dist/resources/route.d.ts#L8.
export interface RouteResponseMeta__0abf9098561d<T> {
data: T;
rateLimit: {
remaining: number | null;
resetAt: Date | null;
};
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L425.
export interface ServiceAccount__75f27de661cf {
id: string;
name: string;
state: ServiceAccountProvisioningState__9ac900abd622;
requestedPermissions: string[];
grantedPermissions: string[];
createdBy: string | null;
approvedBy: string | null;
createdAt: string;
activatedAt: string | null;
revokedAt: string | null;
usageLimits?: ServiceAccountUsageLimitRequest__f255b800fa4e[];
credentialApprovals: ServiceAccountApprovalSummary__7bb90b20ec66[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L382.
export type ServiceAccountApprovalOperation__d422a57b0b16 = "CREATE" | "UPDATE";
Declaration source: packages/farthershore-js/dist/types.d.ts#L508.
export type ServiceAccountApprovalResponse__03a1e6be31e0 = ApprovedServiceAccountCreateResponse__b73a29c4cc94 | ApprovedServiceAccountUpdateResponse__e4e8de0be760;
Declaration source: packages/farthershore-js/dist/resources/keys.d.ts#L37.
export interface ServiceAccountApprovalsResource__52f0cefb9602 {
/** Approval requests this signed-in member is currently eligible to decide. */
list(opts?: {
signal?: AbortSignal;
limit?: number;
offset?: number;
}): Promise<OffsetPage__af8a84ff58be<PendingServiceAccountApproval__5aaaeb81c691>>;
/** Approve the complete request or an explicitly trimmed subset. */
approve(approvalId: string, input?: ApproveServiceAccountInput__db09091445e7): Promise<ServiceAccountApprovalResponse__03a1e6be31e0>;
/** Deny a pending request without minting or widening any credential. */
deny(approvalId: string): Promise<ServiceAccountDenyResponse__93ffa89effd0>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L383.
export interface ServiceAccountApprovalSummary__7bb90b20ec66 {
id: string;
operation: ServiceAccountApprovalOperation__d422a57b0b16;
requestedBy: string;
requestedPermissions: string[];
excessPermissions: string[];
createdAt: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L475.
export type ServiceAccountCreateResponse__081d15d10c13 = ActiveServiceAccountCreateResponse__b15fda647836 | PendingServiceAccountCreateResponse__75eae3a7015a;
Declaration source: packages/farthershore-js/dist/types.d.ts#L518.
export interface ServiceAccountDenyResponse__93ffa89effd0 {
status: "DENIED";
}
Declaration source: packages/farthershore-js/dist/resources/keys.d.ts#L49.
export interface ServiceAccountMutationOptions__2dee3eb4c17c {
/** Reuse this value to replay the same pending create/update request safely. */
idempotencyKey?: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L380.
export type ServiceAccountProvisioningState__9ac900abd622 = "PENDING" | "ACTIVE";
Declaration source: packages/farthershore-js/dist/types.d.ts#L509.
export interface ServiceAccountRotationResponse__e5e68769c407 {
status: "ACTIVE";
serviceAccountId: string;
revokedKeyId: string;
apiKeyId: string;
/** One-time replacement secret. */
plaintext: string;
grantedPermissions: string[];
}
Declaration source: packages/farthershore-js/dist/resources/keys.d.ts#L53.
export interface ServiceAccountsResource__abd2dd8a7d4f {
/** List managed accounts, including PENDING rows with no credential material. */
list(opts?: {
signal?: AbortSignal;
limit?: number;
offset?: number;
}): Promise<OffsetPage__af8a84ff58be<ServiceAccount__75f27de661cf>>;
/** Create immediately when covered, otherwise return a strict PENDING response. */
create(input: CreateServiceAccountInput__30c268ab08ba, options?: ServiceAccountMutationOptions__2dee3eb4c17c): Promise<ServiceAccountCreateResponse__081d15d10c13>;
/** Replace the frozen grant snapshot or create a pending UPDATE request. */
update(serviceAccountId: string, input: UpdateServiceAccountInput__88886ec5643e, options?: ServiceAccountMutationOptions__2dee3eb4c17c): Promise<ServiceAccountUpdateResponse__e6029a12392c>;
/** Rotate the account credential and return the replacement secret once. */
rotate(serviceAccountId: string): Promise<ServiceAccountRotationResponse__e5e68769c407>;
/** Revoke the account and every active credential attached to it. */
revoke(serviceAccountId: string): Promise<void>;
readonly approvals: ServiceAccountApprovalsResource__52f0cefb9602;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L492.
export type ServiceAccountUpdateResponse__e6029a12392c = ActiveServiceAccountUpdateResponse__fe5e8ed2381b | PendingServiceAccountUpdateResponse__97b4460d1924;
Declaration source: packages/farthershore-js/dist/types.d.ts#L399.
export type ServiceAccountUsageLimitRequest__f255b800fa4e = {
quantity: string;
limitUnits: number;
limitCents?: never;
mode: "BLOCK";
notifyAtPct?: never;
} | {
quantity: string;
limitUnits: number;
limitCents?: never;
mode: "NOTIFY";
notifyAtPct: number;
} | {
quantity: string;
limitUnits?: never;
limitCents: number;
mode: "BLOCK";
notifyAtPct?: never;
} | {
quantity: string;
limitUnits?: never;
limitCents: number;
mode: "NOTIFY";
notifyAtPct: number;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L326.
export interface Session__d51a47154738 {
authenticated: boolean;
subscriber: Subscriber__c8719fbb7bfa | null;
/** Verified browser-session identity. Present only for a server-owned test
* persona cookie; Clerk sessions expose their user through the Clerk bridge. */
authSession: PersonaAuthSession__da61c3cf64e7 | null;
}
Declaration source: packages/farthershore-js/dist/components/spend-cap-control.d.ts#L7.
declare function SpendCapControlImpl__efe6f2b0fd95({ className, title, }: SpendCapControlProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/resources/billing.d.ts#L5.
export interface SpendCapResult__395300e78371 {
/** The stored monthly spend cap in cents (null when cleared). */
maxMonthlySpendCents: number | null;
/** The subscription's entitlement version after the write, when returned. */
entitlementVersion?: number;
}
Declaration source: packages/farthershore-js/dist/resources/plans.d.ts#L27.
export interface StartOnboardingInput__af7cf0dea526 extends Omit<SubscribeInput__62c7cb21d77a, "compiledPlanId"> {
compiledPlanId?: string;
}
Declaration source: packages/farthershore-js/dist/resources/plans.d.ts#L5.
export interface SubscribeInput__62c7cb21d77a {
/** The plan to subscribe to — pass `plan.id`. */
compiledPlanId: string;
/** Owning org for org-owned subscriptions (forwarded as the
* `organizationId` query + header). */
organizationId?: string | null;
/** Where Stripe redirects after a successful paid checkout. */
successUrl?: string;
/** Where Stripe redirects if the subscriber abandons checkout. */
cancelUrl?: string;
/** OPTIONAL price-consent echo (E2 — Managed Stripe Price Integrity): the
* `offerFingerprint` from `getPlanOffers()`. When provided and the plan's
* economics changed since the offer was rendered, core rejects with
* 409 PLAN_OFFER_CHANGED (typed as `FartherShorePlanOfferChangedError`) and
* creates NO session — catch it, refetch offers, and re-present the price.
* Omit for today's unguarded behavior. */
offerFingerprint?: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L315.
export interface Subscriber__c8719fbb7bfa {
/** Lifecycle status (e.g. ONBOARDING | ACTIVE | SUSPENDED). */
status: string | null;
/** Denormalized plan key for display. */
planKey: string | null;
/** Immutable CompiledPlan id currently active for this subscriber. */
compiledPlanId: string | null;
/** True only after the selected environment's gateway has the exact active
* subscription projection. */
gatewayReady?: boolean;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L815.
export interface SubscriberActivePromo__160abba5e892 {
id: string;
code: string;
kind: PromoCodeKind__c6690a5a680c;
/** Discount magnitude (percent or cents, per `kind`), or null/absent. */
amount?: number | null;
/** How many billing periods the promo applies for. */
durationMonths: number;
/** ISO timestamp the promo stops applying, or null. */
activeUntil?: string | null;
/** ISO timestamp the promo was applied, or null. */
appliedAt?: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L897.
export interface SubscriberContext__86c582775b78 {
subscriber: SubscriberDetail__3358181c0560 | null;
availablePlans: Plan__3a8348415fe9[];
/**
* E1 — the subscriber's PINNED plan, resolved server-side from the
* subscription's pinned CompiledPlan version (NOT the catalog head — a
* pinned older version may not appear in `availablePlans` at all).
*
* Tri-state for old-Core back-compat:
* - `Plan` — resolved pinned plan.
* - `null` — Core resolved it: there IS no pinned plan (no
* subscription). Do NOT fall back to guessing.
* - `undefined` — the wire field was ABSENT (pre-E1 Core). Only here may
* a consumer fall back to matching `availablePlans` by
* `subscriber.compiledPlanId` (deprecated path).
*/
currentPlan?: Plan__3a8348415fe9 | null;
/** Managed-RBAC product-role keys assigned to the CALLER within the org
* (FAR-698/FAR-700). Server-resolved on `GET /me` — the same row-backed
* source the gateway-token mint uses; the SDK never decodes tokens.
* Empty for pre-RBAC responses. */
roles: string[];
/** The caller's resolved permission strings (`<subject>:read|write`
* grammar). `["*"]` means Managed RBAC is off or the caller is an OWNER;
* personal-org members receive the same resolved permission sets as team-org
* members. Client-side gating over these is UX ONLY — the gateway's
* `permission` constraint is the security boundary. */
permissions: string[];
/** Reviewed product permissions explicitly denied by the subscriber's
* effective roles. Present on current Core responses. */
deniedPermissions?: string[];
/** Current product permissions that were not reviewed by the effective
* roles and therefore inherit the safe product-evolution default of allow.
* Platform/account permissions are never included. */
unassignedProductPermissions?: string[];
/** Per-subscriber ComponentAccessPolicy override rows (Permissions Kernel,
* Wave 5) — `{componentKey, requiredPermission, gateMode}` as core emits
* them. Consumed by the SDK's component-policy resolver; `[]` when the
* subscriber has no overrides (or on older responses). */
componentAccessPolicies: ComponentAccessPolicyRow__60d2c40fe86e[];
/** Current legal acceptance state for this subscriber/org, when served by
* Core. Absent on older responses. */
legalConsent?: LegalConsentStatus__2c5f3ab016cd;
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L859.
export interface SubscriberDetail__3358181c0560 {
id?: string;
status: string | null;
planKey: string | null;
compiledPlanId: string | null;
/** True only after the selected environment's gateway has the exact active
* subscription projection. */
gatewayReady?: boolean;
/** Resource limits on the subscriber's pinned plan, not the latest catalog. */
resourceLimits?: Record<string, number>;
/** Per-dimension meter map (`dimension → unit`) on the subscriber's PINNED
* compiled plan — the billing shape the subscriber is actually on. */
dimensions?: Record<string, number>;
/** The ordered list of meter dimensions the usage tab should display,
* authored by the pinned plan. `rules[].d` indexes into this array. */
displayDims?: string[];
/** Pinned-plan rate-limit / quota allowances (the source of truth for
* included quotas — see {@link SubscriberPinnedRule}). */
rules?: SubscriberPinnedRule__7b0d2ee36c4a[];
/** Stripe-driven lifecycle (e.g. ACTIVE | TRIALING | PAST_DUE | CANCELLED). */
subscriptionLifecycle?: string | null;
/** Stripe-synced trial end (ISO) — drives the trial banner countdown. */
trialEndsAt?: string | null;
/** True when a paid cancel is scheduled for period end ("Renew" un-schedules). */
cancelAtPeriodEnd?: boolean | null;
/** A scheduled plan transition (downgrades apply at period end). */
scheduledTransition?: SubscriberScheduledTransition__cd8a41b51ac1 | null;
/** An active promotional code applied to the subscription, when present. */
activePromo?: SubscriberActivePromo__160abba5e892 | null;
/** P-SPENDCAP-READ (W6.4) — the subscriber-set monthly spend cap, in cents,
* or null when none is set. STORED-not-ENFORCED today (held in
* `Subscription.customMetadata`, pending the rate-limit migration). */
maxMonthlySpendCents?: number | null;
[k: string]: unknown;
}
Declaration source: packages/farthershore-js/dist/resources/plans.d.ts#L44.
export interface SubscribeResult__4b2d9557cede {
/** Stripe Checkout URL (paid plans only). Undefined for free activations. */
url?: string;
/** The activated subscriber (free plans only). Undefined for paid checkout. */
subscriber?: {
id: string;
businessId?: string | null;
status: string;
};
/** Server-side checkout-attempt id, when returned. */
checkoutAttemptId?: string;
/** Best-effort initial API key minted on free-plan activation, when present. */
autoApiKey?: string;
/** Set when the subscriber activated but the first-key mint FAILED — surfaced
* (not swallowed) so the caller can prompt a manual key creation. */
autoApiKeyError?: AutoApiKeyError__bd378e9396dc;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L848.
export interface SubscriberPinnedRule__7b0d2ee36c4a {
/** Dimension index into `displayDims`. */
d: number;
/** Window length in seconds (a 30-day month is 2592000). */
w: number;
/** Capacity (the included allowance for the window). */
c: number;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L832.
export interface SubscriberScheduledTransition__cd8a41b51ac1 {
compiledPlanId: string | null;
planName: string | null;
planType: string | null;
/** ISO timestamp the transition takes effect. */
effectiveAt: string;
/** Movement direction (`CANCEL` | `UPGRADE` | `DOWNGRADE` | `SIDEGRADE`),
* open to producer-side additions. */
kind: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L739.
export interface Subscription__3e996fafa8e7 {
id: string;
/** Display lifecycle status (e.g. ACTIVE | TRIALING | PAST_DUE). Falls back
* across `status` / `lifecycle` on the wire. */
status: string;
planKey: string | null;
planName: string | null;
/** Owning product id, or null when absent on a lean DTO. */
businessId: string | null;
/** Immutable `CompiledPlan.id` currently active, or null. */
compiledPlanId: string | null;
/** Richer lifecycle string straight off the row (may equal `status`). */
lifecycle: string | null;
/** Payment health (`ok` | `past_due` | `incomplete` | …), or null when the
* DTO doesn't carry it (free subs). */
paymentHealth: string | null;
/** ISO start of the current billing period, or null. */
currentPeriodStart: string | null;
/** ISO end of the current billing period, or null. */
currentPeriodEnd: string | null;
/** True when a paid cancel is scheduled for period end. */
cancelAtPeriodEnd: boolean;
/** ISO trial end — drives the trial countdown. */
trialEndsAt: string | null;
/** ISO timestamp the subscription was canceled, or null. */
canceledAt: string | null;
/** A scheduled plan transition, or null when none is pending. */
scheduledTransition: SubscriptionScheduledTransition__57a7b2f83ca5 | null;
/** Whether the subscriber has a Stripe customer (can open the billing
* portal). Free subs that never touched Stripe are `false`. */
canManageInStripe: boolean;
/**
* Whether there is actually something here to cancel — SERVER-DECIDED.
*
* A subscription on a `free`-kind plan has no paid, Stripe-managed
* subscription behind it, so "cancel" has no meaning. The client cannot work
* this out on its own (the portal DTO always carries a real subscription id,
* so "nothing to cancel" looks identical to a lean wire body), which is why
* core answers it.
*
* `null` means the server did not say — treated as CANCELLABLE so an older
* core never strands a paying subscriber with no way to cancel.
*/
cancellable: boolean | null;
/** The full platform subscription DTO (large + evolving) for advanced reads. */
raw: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L955.
export interface SubscriptionContext__55ff0ed7dfb5 {
organizationId: string;
/** Org display name — matches core's wire field (`name`, NOT
* `organizationName`; see apps/core/src/routes/portal-customer/shared.ts). */
name?: string | null;
isDefault?: boolean;
/** Existing subscriber row for this business/org pair. A non-null value
* means this workspace already owns customer state for the product. */
subscriberId?: string | null;
/** Authoritative active-plan entitlement for the selected environment. */
hasEntitlement?: boolean;
[k: string]: unknown;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L968.
export interface SubscriptionContextsResult__fe44e57e7d49 {
contexts: SubscriptionContext__55ff0ed7dfb5[];
defaultOrganizationId: string;
selectedOrganizationId: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L726.
export interface SubscriptionScheduledTransition__57a7b2f83ca5 {
/** Immutable `CompiledPlan.id` the subscription moves to, or null. */
compiledPlanId: string | null;
/** ISO timestamp the transition takes effect, or null. */
effectiveAt: string | null;
/** Movement direction (`CANCEL` | `UPGRADE` | `DOWNGRADE` | `SIDEGRADE`),
* open to producer-side additions. */
kind: string | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L999.
export interface TeamInvitation__f9f120bf906d {
id: string;
email: string;
role: TeamRole__5a6deea9bec8;
/** Managed-RBAC product roles granted on accept. */
businessRoleKeys: string[];
status: string;
invitedByExternalId?: string | null;
expiresAt: string;
createdAt: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1017.
export interface TeamInvitationAccepted__11c705c559ac {
membershipId: string;
role: TeamRole__5a6deea9bec8;
businessRoleKeys: string[];
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L1012.
export interface TeamInvitationCreated__c157ef151993 extends TeamInvitation__f9f120bf906d {
token: string;
emailSent: boolean;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L990.
export interface TeamListResult__85d0b172007d {
ok: boolean;
members: TeamMember__4110e8306e32[];
/** The org's assignable Managed-RBAC role list (FAR-698) — what the
* per-member role multi-select offers. Empty when RBAC is unused. */
availableRoles?: RbacRoleSummary__2161df852611[];
error?: string;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L974.
export interface TeamMember__4110e8306e32 {
id: string;
userExternalId: string;
role: TeamRole__5a6deea9bec8;
/** Managed-RBAC product-role keys assigned to this member (FAR-698).
* Absent on pre-RBAC responses. */
businessRoleKeys?: string[];
/** Assigned keys whose role row no longer exists (deleted roles leave
* assignments in place — resolution ignores them). Drives the portal's
* stale-role warning. */
staleRoleKeys?: string[];
createdAt?: string;
updatedAt?: string;
[k: string]: unknown;
}
Declaration source: packages/farthershore-js/dist/components/team-panel.d.ts#L7.
declare function TeamPanelImpl__c348298e2aa6({ className, title }?: TeamPanelProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/resources/account.d.ts#L13.
export interface TeamResource__b9e413854377 {
/** Team members on the current subscription. A failed read surfaces
* `{ ok:false, error }` (drives the SSR portal's read-only banner) — NOT a
* silent empty list. */
list(opts?: {
signal?: AbortSignal;
}): Promise<TeamListResult__85d0b172007d>;
/**
* Track T2 — subscriber-team invitations. Managers (OWNER/ADMIN) invite by
* email; the invitee accepts with the emailed token. Each method THROWS the
* typed `FartherShoreApiError` on validation/authz failure.
*/
invites: {
/** Pending invitations (OWNER/ADMIN). */
list(opts?: {
signal?: AbortSignal;
}): Promise<TeamInvitation__f9f120bf906d[]>;
/** Create an invitation. `role` defaults to VIEWER; `businessRoleKeys` must
* be a subset of the caller's own permissions (403 otherwise). Returns the
* invitation plus the one-time raw token. */
create(input: {
email: string;
role?: TeamRole__5a6deea9bec8;
businessRoleKeys?: string[];
}): Promise<TeamInvitationCreated__c157ef151993>;
/** Revoke a pending invitation. */
revoke(invitationId: string): Promise<void>;
/** Accept an invitation with its token. The signed-in user's email must
* match the invite (403 mismatch; 409 expired/already-used). */
accept(token: string): Promise<TeamInvitationAccepted__11c705c559ac>;
};
updateRole(membershipId: string, role: TeamRole__5a6deea9bec8): Promise<TeamMember__4110e8306e32>;
remove(membershipId: string): Promise<void>;
/**
* Set-replace a member's Managed-RBAC product-role assignment (FAR-698):
* the given list becomes the member's full assignment; `[]` clears it.
* Every key must reference an existing role. Throws the typed
* `FartherShoreApiError` on validation/authz failures.
* Client-side role gating is UX only; the gateway's `permission`
* constraint is the security boundary.
*/
assignRoles(membershipId: string, roles: string[]): Promise<TeamMember__4110e8306e32>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L973.
export type TeamRole__5a6deea9bec8 = "OWNER" | "ADMIN" | "VIEWER";
Declaration source: packages/farthershore-js/dist/config.d.ts#L80.
export type TokenProvider__40095f0da8e4 = () => string | null | undefined | Promise<string | null | undefined>;
Declaration source: packages/farthershore-js/dist/types.d.ts#L1257.
export interface TransparentBillPreview__bd44f368bc40 {
currency: string;
disclosure: "transparent";
/** The plan's recurring fee, in cents. */
recurringFeeCents: number;
/** Per-rating-window engine totals. */
windows: BillPreviewWindow__ebfec15d43d1[];
totals: {
/** Nanodollars, decimal strings (null = unavailable). */
ratedNanos: NanosAmount__f9c1e22d3cbe;
fundedNanos: NanosAmount__f9c1e22d3cbe;
receivableNanos: NanosAmount__f9c1e22d3cbe;
};
allowances: BillPreviewAllowance__eba9c1df99be[];
/** All-zero counts mean `totals` IS the whole bill. */
usageRating: BillPreviewUsageRating__fb184ad4d633;
}
Declaration source: packages/farthershore-js/dist/components/trial-banner.d.ts#L10.
declare function TrialBannerImpl__d471bab52484({ className, onUpgrade, upgradeLabel, }?: TrialBannerProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/types.d.ts#L447.
export interface UpdateServiceAccountInput__88886ec5643e {
requestedPermissions?: NonEmptyPermissionList__ca911cbb6fa0;
usageLimit?: ServiceAccountUsageLimitRequest__f255b800fa4e | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L637.
export type UpdateUsageLimitInput__eb59c932012e = (UsageLimitUpdateValue__e8f19d3e563b & UsageLimitUpdateMode__0a6925ca669e) | (UsageLimitNoUpdateValue__cd3ce2b61e4f & UsageLimitExplicitUpdateMode__577df72501b7) | (UsageLimitNoUpdateValue__cd3ce2b61e4f & {
mode?: never;
notifyAtPct: number | null;
});
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L4.
interface UpgradePromptBaseProps__aaa79a508e5a {
/** Appended to the root card or direct-plan button. */
className?: string;
}
Declaration source: packages/farthershore-js/dist/components/upgrade-prompt.d.ts#L45.
declare function UpgradePromptImpl__8f7c125f9324(props: UpgradePromptProps): import("react").JSX.Element | null;
Declaration source: packages/farthershore-js/dist/react/use-upgrade.d.ts#L3.
export interface UpgradeTarget__4fa17b7312aa {
/** The plan to upgrade to (pass `plan.id` to `billing.changePlan`). */
plan: Plan__3a8348415fe9;
/** The new cap for the offending dimension, or null when unlimited/unknown.
*/
raisesTo: number | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L553.
declare const USAGE_LIMIT_STRATEGIES__42e6020ce1f4: readonly ["fixed_window", "sliding_window"];
Declaration source: packages/farthershore-js/dist/types.d.ts#L650.
declare const USAGE_TRAFFIC_CLASSES__3e7da6994f34: readonly ["customer_operation", "control_plane", "admin_internal", "background_job", "webhook", "healthcheck", "unclassified"];
Declaration source: packages/farthershore-js/dist/types.d.ts#L649.
export type UsageBillingBasis__f1af1792f9ef = "requests" | "usage";
Declaration source: packages/farthershore-js/dist/components/usage.d.ts#L15.
declare function UsageCardImpl__1cd3adcc9ade({ activeCompiledPlanId, className, renderRow, }?: UsageCardProps): import("react").JSX.Element;
Declaration source: packages/farthershore-js/dist/types.d.ts#L654.
export type UsageChargeableOutcomes__7192cca0f62f = "success_only" | "success_and_partial" | "attempted" | "trusted_actual_usage_only";
Declaration source: packages/farthershore-js/dist/types.d.ts#L679.
export interface UsageEvent__0652cabf737c {
id: string;
timestamp: string;
operation: string;
apiKeyPrefix: string | null;
statusCode: number | null;
status: "success" | "error";
/** Event kind (e.g. "api"); shown as the row Type. */
type: string | null;
latencyMs: number | null;
/** Canonical per-event meter values, keyed by product-declared meter. */
dimensions: UsageEventDimensions__f3dde72e4b29;
/** Compatibility aliases for common legacy portal displays. */
requests: number | null;
tokens: number | null;
/** Advisory UsagePolicy state confirmed or relayed by the gateway/core. The
* frontend decides nothing from this; it is only for rendering stale-tolerant
* labels, cooldowns, and prompts. */
usagePolicy?: UsagePolicyAdvisory__0000f21c4f54;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L646.
export type UsageEventDimensions__f3dde72e4b29 = Record<string, number | null>;
Declaration source: packages/farthershore-js/dist/types.d.ts#L580.
export type UsageLimit__ab648bdf9611 = UsageLimitSubject__9eba54806aaa & UsageLimitValue__4ae5aa5bc7c5 & {
id: string;
quantity: string;
mode: UsageLimitMode__a43840c0d8cf;
period: "BILLING_PERIOD";
/** Present only for NOTIFY rows. */
notifyAtPct?: number;
ceiling: UsageLimitCeiling__6c51e5a840f6;
/** Present when the edge accounts this limit on a non-default window. */
effectiveWindow?: UsageLimitEffectiveWindow__87a0c7ebed46;
createdBy: string | null;
createdAt: string;
updatedAt: string;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L549.
export interface UsageLimitCeiling__6c51e5a840f6 {
limitUnits?: number;
limitCents?: number;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L595.
type UsageLimitCreateMode__f16ef2d50497 = {
mode: "BLOCK";
notifyAtPct?: never;
} | {
mode: "NOTIFY";
notifyAtPct: number;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L641.
export interface UsageLimitDeleteResult__734b143ab2a2 {
id: string;
deleted: true;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L559.
export interface UsageLimitEffectiveWindow__87a0c7ebed46 {
strategy: UsageLimitStrategy__119d691e431d;
periodSeconds: number;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L628.
type UsageLimitExplicitUpdateMode__577df72501b7 = {
mode: "BLOCK";
notifyAtPct?: null;
} | {
mode: "NOTIFY";
notifyAtPct: number;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L594.
export type UsageLimitListResponse__2eeb76f22fde = OffsetPage__af8a84ff58be<UsageLimit__ab648bdf9611>;
Declaration source: packages/farthershore-js/dist/types.d.ts#L548.
export type UsageLimitMode__a43840c0d8cf = "BLOCK" | "NOTIFY";
Declaration source: packages/farthershore-js/dist/types.d.ts#L614.
type UsageLimitNoUpdateValue__cd3ce2b61e4f = {
limitUnits?: never;
limitCents?: never;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L653.
export type UsageLimitProfile__4ac9b6a9c466 = "customer_usage" | "business_capacity" | "control_plane" | "admin_internal" | "platform_abuse_only" | "healthcheck" | "none";
Declaration source: packages/farthershore-js/dist/resources/usage-limits.d.ts#L3.
export interface UsageLimitsResource__2b1e05e6bcda {
/** List the current subscriber organization's visible per-actor limits.
* `options.signal` is accepted for source compatibility but does not cancel
* the shared cached fetch; the cache owns the request lifecycle. */
list(options?: {
signal?: AbortSignal;
limit?: number;
offset?: number;
}): Promise<UsageLimitListResponse__2eeb76f22fde>;
/** Create a subscriber-authored usage limit. */
create(input: CreateUsageLimitInput__0aee95b69b13): Promise<UsageLimit__ab648bdf9611>;
/** Update mutable value, mode, or threshold fields. */
update(limitId: string, input: UpdateUsageLimitInput__eb59c932012e): Promise<UsageLimit__ab648bdf9611>;
/** Permanently remove a subscriber-authored usage limit. */
delete(limitId: string): Promise<UsageLimitDeleteResult__734b143ab2a2>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L554.
export type UsageLimitStrategy__119d691e431d = (typeof USAGE_LIMIT_STRATEGIES__42e6020ce1f4)[number];
Declaration source: packages/farthershore-js/dist/types.d.ts#L570.
export type UsageLimitSubject__9eba54806aaa = {
scope: "ORG";
subjectId?: never;
} | {
scope: "MEMBER";
subjectId: string;
} | {
scope: "SERVICE_ACCOUNT";
subjectId: string;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L618.
type UsageLimitUpdateMode__0a6925ca669e = {
mode?: never;
notifyAtPct?: number | null;
} | {
mode: "BLOCK";
notifyAtPct?: null;
} | {
mode: "NOTIFY";
notifyAtPct: number;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L607.
type UsageLimitUpdateValue__e8f19d3e563b = {
limitUnits: number;
limitCents?: never;
} | {
limitCents: number;
limitUnits?: never;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L563.
export type UsageLimitValue__4ae5aa5bc7c5 = {
limitUnits: number;
limitCents?: never;
} | {
limitCents: number;
limitUnits?: never;
};
Declaration source: packages/farthershore-js/dist/types.d.ts#L655.
export interface UsagePolicyAdvisory__0000f21c4f54 {
/** Gateway-resolved policy id, when the usage payload includes one. */
usagePolicyId: string | null;
/** Known traffic class; null when a newer gateway sends a class this SDK
* does not know yet. See `unknownTrafficClass` for the preserved raw value. */
trafficClass: UsageTrafficClass__530fe2057481 | null;
unknownTrafficClass?: string;
policySource: UsagePolicySource__baee26093419 | null;
limitProfile: UsageLimitProfile__4ac9b6a9c466 | null;
customerBillable: boolean | null;
providerCostTracked: boolean | null;
chargeableOutcomes: UsageChargeableOutcomes__7192cca0f62f | null;
meterKey: string | null;
cooldownResetAt: number | null;
retryAfterSeconds: number | null;
freeButLimited: boolean;
providerCost: boolean;
upgradePrompt: boolean;
creditPrompt: boolean;
genericMessage: string;
/** Raw gateway/core policy fields. Preserved for forward-compatible UIs and
* debugging; advisory only and never an enforcement input. */
raw: Record<string, unknown>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L652.
export type UsagePolicySource__baee26093419 = "declared" | "inherited" | "defaulted" | "inferred";
Declaration source: packages/farthershore-js/dist/resources/usage.d.ts#L3.
export interface UsageRange__216cd12bcfd1 {
from?: string;
to?: string;
}
Declaration source: packages/farthershore-js/dist/resources/usage.d.ts#L7.
export interface UsageResource__a3469cda0e70 {
/** Dimension → total for the period (requests/tokens/computeMs/dollars…).
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached fetch (the cache owns the fetch lifecycle); the read is unmount-safe
* via the hook's active-flag and bounded by the cache TTL. */
summary(range?: UsageRange__216cd12bcfd1, opts?: {
signal?: AbortSignal;
}): Promise<UsageSummary__0f0a1f283e9b>;
/** The most-recent usage events (platform caps this list).
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached fetch (the cache owns the fetch lifecycle); the read is unmount-safe
* via the hook's active-flag and bounded by the cache TTL. */
events(range?: UsageRange__216cd12bcfd1, opts?: {
signal?: AbortSignal;
}): Promise<UsageEvent__0652cabf737c[]>;
/** Everything in one round-trip: per-dimension totals + recent events + the
* billing basis (the "Requests" vs "Usage" meter-label hint).
*
* `opts.signal` is accepted for source-compat but does NOT cancel the shared
* cached fetch (the cache owns the fetch lifecycle); the read is unmount-safe
* via the hook's active-flag and bounded by the cache TTL. */
snapshot(range?: UsageRange__216cd12bcfd1, opts?: {
signal?: AbortSignal;
includeEvents?: boolean;
}): Promise<UsageSnapshot__f8d76d9838e8>;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L701.
export interface UsageSnapshot__f8d76d9838e8 {
summary: UsageSummary__0f0a1f283e9b;
events: UsageEvent__0652cabf737c[];
billingBasis: UsageBillingBasis__f1af1792f9ef;
/** Whether `summary` is an EXACT total over the whole period (`true`, the
* DB-side aggregate) or an approximation from a bounded event sample
* (`false`). A `false` here means the UI should flag the figure as
* approximate. Defaults to `true` (additive — older Cores omit it). */
exact: boolean;
/** Number of usage events the `summary` total was computed from over the
* period. With `exact: true` this is the true event count; with
* `exact: false` it's the sampled (capped) count. */
sampledEvents: number;
/** ISO start of the period the `summary` covers (the resolved `from`), or
* null when the Core doesn't report it. */
periodStart: string | null;
/** ISO end of the period the `summary` covers (the resolved `to`), or null
* when the Core doesn't report it. */
periodEnd: string | null;
/** Aggregated advisory policy state from the freshest event in this snapshot.
* Null when no event carries policy metadata. */
usagePolicy: UsagePolicyAdvisory__0000f21c4f54 | null;
}
Declaration source: packages/farthershore-js/dist/types.d.ts#L645.
export type UsageSummary__0f0a1f283e9b = Record<string, number>;
Declaration source: packages/farthershore-js/dist/types.d.ts#L651.
export type UsageTrafficClass__530fe2057481 = (typeof USAGE_TRAFFIC_CLASSES__3e7da6994f34)[number];