@farthershore/farthershore-js 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -0
- package/dist/bootstrap.d.ts +6 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +147 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/catalog.d.ts +81 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +281 -0
- package/dist/catalog.js.map +1 -0
- package/dist/client.d.ts +33 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +56 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +53 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +48 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +27 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +47 -0
- package/dist/errors.js.map +1 -0
- package/dist/http.d.ts +22 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +104 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/react/hooks.d.ts +47 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +87 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +10 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/provider.d.ts +15 -0
- package/dist/react/provider.d.ts.map +1 -0
- package/dist/react/provider.js +25 -0
- package/dist/react/provider.js.map +1 -0
- package/dist/react/use-async.d.ts +14 -0
- package/dist/react/use-async.d.ts.map +1 -0
- package/dist/react/use-async.js +39 -0
- package/dist/react/use-async.js.map +1 -0
- package/dist/resources/_shared.d.ts +6 -0
- package/dist/resources/_shared.d.ts.map +1 -0
- package/dist/resources/_shared.js +13 -0
- package/dist/resources/_shared.js.map +1 -0
- package/dist/resources/analytics.d.ts +8 -0
- package/dist/resources/analytics.d.ts.map +1 -0
- package/dist/resources/analytics.js +9 -0
- package/dist/resources/analytics.js.map +1 -0
- package/dist/resources/auth.d.ts +18 -0
- package/dist/resources/auth.d.ts.map +1 -0
- package/dist/resources/auth.js +61 -0
- package/dist/resources/auth.js.map +1 -0
- package/dist/resources/billing.d.ts +33 -0
- package/dist/resources/billing.d.ts.map +1 -0
- package/dist/resources/billing.js +61 -0
- package/dist/resources/billing.js.map +1 -0
- package/dist/resources/feature.d.ts +17 -0
- package/dist/resources/feature.d.ts.map +1 -0
- package/dist/resources/feature.js +14 -0
- package/dist/resources/feature.js.map +1 -0
- package/dist/resources/keys.d.ts +15 -0
- package/dist/resources/keys.d.ts.map +1 -0
- package/dist/resources/keys.js +55 -0
- package/dist/resources/keys.js.map +1 -0
- package/dist/resources/plans.d.ts +42 -0
- package/dist/resources/plans.d.ts.map +1 -0
- package/dist/resources/plans.js +43 -0
- package/dist/resources/plans.js.map +1 -0
- package/dist/resources/product.d.ts +7 -0
- package/dist/resources/product.d.ts.map +1 -0
- package/dist/resources/product.js +8 -0
- package/dist/resources/product.js.map +1 -0
- package/dist/resources/usage.d.ts +17 -0
- package/dist/resources/usage.d.ts.map +1 -0
- package/dist/resources/usage.js +35 -0
- package/dist/resources/usage.js.map +1 -0
- package/dist/types.d.ts +206 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ClientContext } from "../config.js";
|
|
2
|
+
import type { Bootstrap, Plan } from "../types.js";
|
|
3
|
+
/** Input to `subscribe()`. `compiledPlanId` is the `Plan.id` (immutable
|
|
4
|
+
* CompiledPlan pointer). */
|
|
5
|
+
export interface SubscribeInput {
|
|
6
|
+
/** The plan to subscribe to — pass `plan.id`. */
|
|
7
|
+
compiledPlanId: string;
|
|
8
|
+
/** Owning org for org-owned subscriptions (forwarded as the
|
|
9
|
+
* `organizationId` query + header). */
|
|
10
|
+
organizationId?: string | null;
|
|
11
|
+
/** Where Stripe redirects after a successful paid checkout. */
|
|
12
|
+
successUrl?: string;
|
|
13
|
+
/** Where Stripe redirects if the subscriber abandons checkout. */
|
|
14
|
+
cancelUrl?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Result of `subscribe()`. For a PAID plan, `url` is the Stripe Checkout URL to
|
|
17
|
+
* navigate to. For a FREE plan, there is no `url` — the subscriber was
|
|
18
|
+
* activated directly and `subscriber` describes the new row. */
|
|
19
|
+
export interface SubscribeResult {
|
|
20
|
+
/** Stripe Checkout URL (paid plans only). Undefined for free activations. */
|
|
21
|
+
url?: string;
|
|
22
|
+
/** The activated subscriber (free plans only). Undefined for paid checkout. */
|
|
23
|
+
subscriber?: {
|
|
24
|
+
id: string;
|
|
25
|
+
productId?: string;
|
|
26
|
+
status: string;
|
|
27
|
+
};
|
|
28
|
+
/** Server-side checkout-attempt id, when returned. */
|
|
29
|
+
checkoutAttemptId?: string;
|
|
30
|
+
/** Best-effort initial API key minted on free-plan activation, when present. */
|
|
31
|
+
autoApiKey?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PlansResource {
|
|
34
|
+
/** The product's available plans (resolved via bootstrap). Empty when the
|
|
35
|
+
* product has no published, self-serve plans. */
|
|
36
|
+
list(): Promise<Plan[]>;
|
|
37
|
+
/** Start checkout for a plan. Paid → `{ url }` (navigate to Stripe). Free →
|
|
38
|
+
* `{ subscriber }` (activated directly). */
|
|
39
|
+
subscribe(input: SubscribeInput): Promise<SubscribeResult>;
|
|
40
|
+
}
|
|
41
|
+
export declare function createPlansResource(ctx: ClientContext, ensureBootstrap: () => Promise<Bootstrap>): PlansResource;
|
|
42
|
+
//# sourceMappingURL=plans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../src/resources/plans.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGnD;6BAC6B;AAC7B,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB;4CACwC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;iEAEiE;AACjE,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,UAAU,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,MAAM,WAAW,aAAa;IAC5B;sDACkD;IAClD,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACxB;iDAC6C;IAC7C,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5D;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,aAAa,EAClB,eAAe,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GACxC,aAAa,CA+Bf"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// The plans/catalog + purchase surface. `fs.plans.list()` returns the product's
|
|
2
|
+
// available plans (from bootstrap — the same DTO the portal renders from), and
|
|
3
|
+
// `fs.plans.subscribe()` starts checkout: paid plans return a Stripe Checkout
|
|
4
|
+
// URL the caller navigates to; free plans activate the subscriber directly and
|
|
5
|
+
// return the created subscriber (no URL).
|
|
6
|
+
//
|
|
7
|
+
// This is the ONLY purchase path the SDK exposes — it POSTs to the existing core
|
|
8
|
+
// endpoint `/portal/products/:productId/me/checkout-session`, the same route the
|
|
9
|
+
// SSR portal uses.
|
|
10
|
+
import { coreFetch } from "../http.js";
|
|
11
|
+
import { requireProductId, mePath } from "./_shared.js";
|
|
12
|
+
export function createPlansResource(ctx, ensureBootstrap) {
|
|
13
|
+
return {
|
|
14
|
+
async list() {
|
|
15
|
+
return (await ensureBootstrap()).plans;
|
|
16
|
+
},
|
|
17
|
+
async subscribe(input) {
|
|
18
|
+
const productId = requireProductId(ctx);
|
|
19
|
+
const raw = await coreFetch(ctx, {
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: mePath(productId, "/checkout-session"),
|
|
22
|
+
query: input.organizationId
|
|
23
|
+
? { organizationId: input.organizationId }
|
|
24
|
+
: undefined,
|
|
25
|
+
body: {
|
|
26
|
+
compiledPlanId: input.compiledPlanId,
|
|
27
|
+
organizationId: input.organizationId ?? undefined,
|
|
28
|
+
successUrl: input.successUrl,
|
|
29
|
+
cancelUrl: input.cancelUrl,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
...(raw.url ? { url: raw.url } : {}),
|
|
34
|
+
...(raw.subscriber ? { subscriber: raw.subscriber } : {}),
|
|
35
|
+
...(raw.checkoutAttemptId
|
|
36
|
+
? { checkoutAttemptId: raw.checkoutAttemptId }
|
|
37
|
+
: {}),
|
|
38
|
+
...(raw.autoApiKey ? { autoApiKey: raw.autoApiKey } : {}),
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=plans.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../../src/resources/plans.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+EAA+E;A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,iBAAiB;oBACvB,CAAC,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,EAAE;oBAC9C,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC1D,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Bootstrap, Product } from "../types.js";
|
|
2
|
+
export interface ProductResource {
|
|
3
|
+
/** The product this frontend is running for (resolved via bootstrap). */
|
|
4
|
+
get(): Promise<Product>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createProductResource(ensureBootstrap: () => Promise<Bootstrap>): ProductResource;
|
|
7
|
+
//# sourceMappingURL=product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/resources/product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB;AAED,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GACxC,eAAe,CAMjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../src/resources/product.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,qBAAqB,CACnC,eAAyC;IAEzC,OAAO;QACL,KAAK,CAAC,GAAG;YACP,OAAO,CAAC,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC;QAC3C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ClientContext } from "../config.js";
|
|
2
|
+
import type { UsageEvent, UsageSummary } from "../types.js";
|
|
3
|
+
export interface UsageRange {
|
|
4
|
+
from?: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UsageResource {
|
|
8
|
+
/** Dimension → total for the period (requests/tokens/computeMs/dollars…). */
|
|
9
|
+
summary(range?: UsageRange): Promise<UsageSummary>;
|
|
10
|
+
/** The most-recent usage events (platform caps this list). */
|
|
11
|
+
events(range?: UsageRange): Promise<UsageEvent[]>;
|
|
12
|
+
/** Bucketed timeseries — no platform endpoint yet; derive from `events()` for
|
|
13
|
+
* now, or add a Core route later. Throws to stay honest. */
|
|
14
|
+
timeseries(): never;
|
|
15
|
+
}
|
|
16
|
+
export declare function createUsageResource(ctx: ClientContext): UsageResource;
|
|
17
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/resources/usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAkB5D,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACnD,8DAA8D;IAC9D,MAAM,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAClD;iEAC6D;IAC7D,UAAU,IAAI,KAAK,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,aAAa,CAmCrE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { coreFetch } from "../http.js";
|
|
2
|
+
import { FartherShoreNotImplementedError } from "../errors.js";
|
|
3
|
+
import { mePath, requireProductId } from "./_shared.js";
|
|
4
|
+
export function createUsageResource(ctx) {
|
|
5
|
+
async function fetchUsage(range) {
|
|
6
|
+
const productId = requireProductId(ctx);
|
|
7
|
+
return coreFetch(ctx, {
|
|
8
|
+
method: "GET",
|
|
9
|
+
path: mePath(productId, "/usage"),
|
|
10
|
+
query: { from: range?.from, to: range?.to },
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
async summary(range) {
|
|
15
|
+
return (await fetchUsage(range)).summary;
|
|
16
|
+
},
|
|
17
|
+
async events(range) {
|
|
18
|
+
const raw = await fetchUsage(range);
|
|
19
|
+
return raw.items.map((i) => ({
|
|
20
|
+
id: i.id,
|
|
21
|
+
timestamp: i.timestamp,
|
|
22
|
+
operation: i.operation,
|
|
23
|
+
statusCode: i.statusCode ?? null,
|
|
24
|
+
status: i.status,
|
|
25
|
+
latencyMs: i.latencyMs ?? null,
|
|
26
|
+
requests: i.requests ?? null,
|
|
27
|
+
tokens: i.tokens ?? null,
|
|
28
|
+
}));
|
|
29
|
+
},
|
|
30
|
+
timeseries() {
|
|
31
|
+
throw new FartherShoreNotImplementedError("usage.timeseries() has no platform endpoint yet — derive a series from usage.events(), or add a Core timeseries route. (Deferred.)");
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/resources/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAgCxD,MAAM,UAAU,mBAAmB,CAAC,GAAkB;IAC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logoUrl: string | null;
|
|
4
|
+
primaryColor: string | null;
|
|
5
|
+
/** Marketing/header description for the product, when set. */
|
|
6
|
+
description: string | null;
|
|
7
|
+
}
|
|
8
|
+
/** A product-level meter definition (the dimension catalog used to label/format
|
|
9
|
+
* usage). Mirrors the wire `MeterDefinition`; only the display-relevant fields
|
|
10
|
+
* are surfaced. */
|
|
11
|
+
export interface Meter {
|
|
12
|
+
/** Stable dimension key (e.g. "requests", "tokens"). */
|
|
13
|
+
key: string;
|
|
14
|
+
/** Human-friendly label for the dimension. */
|
|
15
|
+
display: string;
|
|
16
|
+
/** Optional unit suffix (e.g. "ms", "tokens"). */
|
|
17
|
+
unit?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface Product {
|
|
20
|
+
id: string;
|
|
21
|
+
/** Subdomain slug (the first label of the gateway/portal host). */
|
|
22
|
+
slug: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string | null;
|
|
25
|
+
branding: Branding;
|
|
26
|
+
/** Gateway origin host for builder-feature calls (the product `runtimeHostname`). */
|
|
27
|
+
gatewayHost: string;
|
|
28
|
+
/** Public portal host. */
|
|
29
|
+
portalHost: string;
|
|
30
|
+
/** R2 public origin + product prefix where MDX docs live, or null when the
|
|
31
|
+
* platform has no docs origin configured (local dev). The `/docs` view
|
|
32
|
+
* concatenates the doc filename onto this. */
|
|
33
|
+
docsBaseUrl: string | null;
|
|
34
|
+
/** R2 public origin + product prefix for per-product legal MDX
|
|
35
|
+
* (terms / privacy), or null. The legal view falls back to the platform
|
|
36
|
+
* terms notice when null. */
|
|
37
|
+
legalBaseUrl: string | null;
|
|
38
|
+
/** Immutable `CompiledPlan.id` of the featured plan, or null. Used to render
|
|
39
|
+
* the "Most Popular" treatment in the plans UI. */
|
|
40
|
+
featuredCompiledPlanId: string | null;
|
|
41
|
+
/** Product-level meter definitions — the dimension catalog used to label
|
|
42
|
+
* usage rows. Empty when the product declares no meters. */
|
|
43
|
+
meters: Meter[];
|
|
44
|
+
}
|
|
45
|
+
export type AuthStrategy = "clerk" | "test-personas";
|
|
46
|
+
export interface EnvironmentInfo {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
slug: string;
|
|
50
|
+
/** Which sign-in flow the portal should drive: Clerk (production) or the
|
|
51
|
+
* persona key-exchange (preview/test envs). */
|
|
52
|
+
authStrategy: AuthStrategy;
|
|
53
|
+
/** Env branch name (preview/test envs), or null for production scope. */
|
|
54
|
+
branch: string | null;
|
|
55
|
+
/** Billing provider mode for the env: "test" (no real money) or "live".
|
|
56
|
+
* Null when the resolve was production-scoped (no env block). The plans UI
|
|
57
|
+
* surfaces a "Test mode" badge when this is "test". */
|
|
58
|
+
stripeMode: string | null;
|
|
59
|
+
}
|
|
60
|
+
/** A grant entry on a plan — the unified credit-grant model. Discriminated on
|
|
61
|
+
* `kind`. Mirrors the wire `GrantSpec`; consumers iterate the effective list
|
|
62
|
+
* (which appends a synthesized `trial` entry when `trialDays > 0`). */
|
|
63
|
+
export type Grant = {
|
|
64
|
+
kind: "recurring";
|
|
65
|
+
amount_cents: number;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "one_time";
|
|
68
|
+
amount_cents: number;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "promotional";
|
|
71
|
+
amount_cents: number;
|
|
72
|
+
label: string;
|
|
73
|
+
expires_after_days?: number;
|
|
74
|
+
} | {
|
|
75
|
+
kind: "trial";
|
|
76
|
+
} | {
|
|
77
|
+
kind: "rollover";
|
|
78
|
+
percent: number;
|
|
79
|
+
} | {
|
|
80
|
+
kind: "top_up";
|
|
81
|
+
sku: string;
|
|
82
|
+
label: string;
|
|
83
|
+
price_cents: number;
|
|
84
|
+
credit_cents: number;
|
|
85
|
+
} | {
|
|
86
|
+
kind: "auto_recharge";
|
|
87
|
+
threshold_cents: number;
|
|
88
|
+
refill_cents: number;
|
|
89
|
+
};
|
|
90
|
+
/** A metered price entry on a plan (per-dimension $/unit). */
|
|
91
|
+
export interface PlanMeter {
|
|
92
|
+
dimension: string;
|
|
93
|
+
price_per_unit_micros: number;
|
|
94
|
+
}
|
|
95
|
+
/** A named rate-limit / quota rule on a plan. `window.name === "month"` rules
|
|
96
|
+
* are the included-quota allowances the usage card renders against. */
|
|
97
|
+
export interface PlanLimit {
|
|
98
|
+
dimension: string;
|
|
99
|
+
window: {
|
|
100
|
+
type: "named";
|
|
101
|
+
name: string;
|
|
102
|
+
} | {
|
|
103
|
+
type: "custom";
|
|
104
|
+
seconds: number;
|
|
105
|
+
};
|
|
106
|
+
capacity: number;
|
|
107
|
+
enforcement?: "enforce" | "track";
|
|
108
|
+
}
|
|
109
|
+
/** A purchasable/available plan in the product catalog. Mirrors core's
|
|
110
|
+
* `PortalPlan` (the rich 5-knob unified billing shape) so the template can
|
|
111
|
+
* render pricing, included quotas, grants, and a subscribe button. */
|
|
112
|
+
export interface Plan {
|
|
113
|
+
/** Immutable `CompiledPlan.id` — the pointer passed to `subscribe()`. */
|
|
114
|
+
id: string;
|
|
115
|
+
key: string;
|
|
116
|
+
name: string;
|
|
117
|
+
description: string | null;
|
|
118
|
+
/** Recurring fee, in cents (0 for free / pay-as-you-go plans). */
|
|
119
|
+
recurringFeeCents: number;
|
|
120
|
+
/** Unified credit-grant array (recurring/prepaid/promotional/...). */
|
|
121
|
+
grants: Grant[];
|
|
122
|
+
/** Free-trial length in days (0 = no trial). */
|
|
123
|
+
trialDays: number;
|
|
124
|
+
/** Optional monthly spend cap, in cents. */
|
|
125
|
+
maxMonthlySpendCents: number | null;
|
|
126
|
+
/** Optional minimum monthly spend floor, in cents. */
|
|
127
|
+
minMonthlySpendCents: number | null;
|
|
128
|
+
/** Per-dimension metered prices ($/unit). Empty for non-metered plans. */
|
|
129
|
+
meters: PlanMeter[];
|
|
130
|
+
/** Quota + rate-limit rules. Month-window rules are the included allowances. */
|
|
131
|
+
limits: PlanLimit[];
|
|
132
|
+
/** Optional builder-authored feature bullets shown on the plan card. */
|
|
133
|
+
planDetails: string[];
|
|
134
|
+
}
|
|
135
|
+
/** What `fs.bootstrap()` returns — everything a generated/managed frontend needs
|
|
136
|
+
* to discover the product it's running for AND render its catalog: the full
|
|
137
|
+
* plan list (pricing model, included quotas, grants), product meters, docs /
|
|
138
|
+
* legal origins, and the featured-plan pointer. */
|
|
139
|
+
export interface Bootstrap {
|
|
140
|
+
product: Product;
|
|
141
|
+
environment: EnvironmentInfo | null;
|
|
142
|
+
branding: Branding;
|
|
143
|
+
/** The product's available/purchasable plans (empty when none are
|
|
144
|
+
* published). The single source the plans/pricing UI renders from. */
|
|
145
|
+
plans: Plan[];
|
|
146
|
+
/** The product's active custom-frontend release hash, or null. Informational
|
|
147
|
+
* (diagnostics) — V0 serving is host-keyed at the edge. */
|
|
148
|
+
frontendReleaseHash: string | null;
|
|
149
|
+
/** Capability keys derived from the plan set (non-empty once plans exist):
|
|
150
|
+
* e.g. "billing", "usage-quota", "credit-grants", "docs", "legal". */
|
|
151
|
+
capabilities: string[];
|
|
152
|
+
/** Reserved for future dynamic feature discovery. */
|
|
153
|
+
features: string[];
|
|
154
|
+
}
|
|
155
|
+
export interface Subscriber {
|
|
156
|
+
/** Lifecycle status (e.g. ONBOARDING | ACTIVE | SUSPENDED). */
|
|
157
|
+
status: string | null;
|
|
158
|
+
/** Denormalized plan key for display. */
|
|
159
|
+
planKey: string | null;
|
|
160
|
+
/** Immutable CompiledPlan id currently active for this subscriber. */
|
|
161
|
+
compiledPlanId: string | null;
|
|
162
|
+
}
|
|
163
|
+
export interface Session {
|
|
164
|
+
authenticated: boolean;
|
|
165
|
+
subscriber: Subscriber | null;
|
|
166
|
+
}
|
|
167
|
+
export interface ApiKey {
|
|
168
|
+
id: string;
|
|
169
|
+
keyPrefix: string;
|
|
170
|
+
label: string | null;
|
|
171
|
+
/** Normalized lowercase, e.g. "active" | "revoked". */
|
|
172
|
+
status: string;
|
|
173
|
+
createdAt: string;
|
|
174
|
+
lastUsedAt: string | null;
|
|
175
|
+
revokedAt: string | null;
|
|
176
|
+
}
|
|
177
|
+
/** Returned ONLY by create/rotate — carries the full secret, shown once. */
|
|
178
|
+
export interface CreatedApiKey extends ApiKey {
|
|
179
|
+
/** The full key. The platform never returns it again — store it now. */
|
|
180
|
+
secret: string;
|
|
181
|
+
}
|
|
182
|
+
export type UsageSummary = Record<string, number>;
|
|
183
|
+
export interface UsageEvent {
|
|
184
|
+
id: string;
|
|
185
|
+
timestamp: string;
|
|
186
|
+
operation: string;
|
|
187
|
+
statusCode: number | null;
|
|
188
|
+
status: "success" | "error";
|
|
189
|
+
latencyMs: number | null;
|
|
190
|
+
requests: number | null;
|
|
191
|
+
tokens: number | null;
|
|
192
|
+
}
|
|
193
|
+
export interface Subscription {
|
|
194
|
+
id: string;
|
|
195
|
+
status: string;
|
|
196
|
+
planKey: string | null;
|
|
197
|
+
planName: string | null;
|
|
198
|
+
/** The full platform subscription DTO (large + evolving) for advanced reads. */
|
|
199
|
+
raw: unknown;
|
|
200
|
+
}
|
|
201
|
+
export interface SignInResult {
|
|
202
|
+
token: string;
|
|
203
|
+
expiresAt: string;
|
|
204
|
+
user: unknown;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,8DAA8D;IAC9D,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;oBAEoB;AACpB,MAAM,WAAW,KAAK;IACpB,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IAC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AElD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gFAAgF;IAChF,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// The SDK's PUBLIC domain types — a clean, frontend-friendly surface that does
|
|
2
|
+
// not leak the platform's internal server contracts. Resources map the raw wire
|
|
3
|
+
// responses into these.
|
|
4
|
+
//
|
|
5
|
+
// NOTE: the plan/meter/grant/limit shapes below intentionally MIRROR the
|
|
6
|
+
// snake_case field names of core's `/portal/public/resolve` DTO (PortalPlan /
|
|
7
|
+
// MeterDefinition / GrantSpec in `@farthershore/contracts`). The SDK is
|
|
8
|
+
// deliberately decoupled from the contracts package — these are SDK-local
|
|
9
|
+
// re-declarations so a generated/managed frontend has a typed catalog surface
|
|
10
|
+
// without pulling the whole server contract graph into the browser bundle.
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,gFAAgF;AAChF,wBAAwB;AACxB,EAAE;AACF,yEAAyE;AACzE,8EAA8E;AAC9E,wEAAwE;AACxE,0EAA0E;AAC1E,8EAA8E;AAC9E,2EAA2E"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@farthershore/farthershore-js",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Farther Shore Frontend SDK — the browser integration layer between static frontends and the Farther Shore platform (Core + Gateway).",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./react": {
|
|
18
|
+
"types": "./dist/react/index.d.ts",
|
|
19
|
+
"import": "./dist/react/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"farthershore",
|
|
31
|
+
"sdk",
|
|
32
|
+
"frontend",
|
|
33
|
+
"portal"
|
|
34
|
+
],
|
|
35
|
+
"author": "Farther Shore",
|
|
36
|
+
"license": "UNLICENSED",
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"react": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@testing-library/react": "^16.1.0",
|
|
47
|
+
"@types/node": "^25.7.0",
|
|
48
|
+
"@types/react": "^19.0.0",
|
|
49
|
+
"eslint": "^10.3.0",
|
|
50
|
+
"jsdom": "^26.0.0",
|
|
51
|
+
"react": "^19.0.0",
|
|
52
|
+
"react-dom": "^19.0.0",
|
|
53
|
+
"typescript": "^6.0.2",
|
|
54
|
+
"typescript-eslint": "^8.59.3",
|
|
55
|
+
"vitest": "^4.1.6"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsc",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
|
+
"lint": "eslint .",
|
|
61
|
+
"lint:fix": "eslint . --fix",
|
|
62
|
+
"test": "vitest run"
|
|
63
|
+
}
|
|
64
|
+
}
|