diff --git a/apps/website/content/docs/licensing/getting-started/introduction.mdx b/apps/website/content/docs/licensing/getting-started/introduction.mdx index b812c167..ff49f668 100644 --- a/apps/website/content/docs/licensing/getting-started/introduction.mdx +++ b/apps/website/content/docs/licensing/getting-started/introduction.mdx @@ -31,7 +31,7 @@ A token is: The payload must match `LicenseClaims`: ```ts -type LicenseTier = 'developer-seat' | 'app-deployment' | 'enterprise'; +type LicenseTier = 'developer_seat' | 'team' | 'enterprise'; interface LicenseClaims { sub: string; diff --git a/apps/website/content/docs/licensing/guides/setup.mdx b/apps/website/content/docs/licensing/guides/setup.mdx index 29aaa75a..5deee062 100644 --- a/apps/website/content/docs/licensing/guides/setup.mdx +++ b/apps/website/content/docs/licensing/guides/setup.mdx @@ -23,7 +23,7 @@ import { const status = await runLicenseCheck({ package: '@threadplane/example', - token: process.env.THREADPLANE_LICENSE, + token: process.env['THREADPLANE_LICENSE'], publicKey: LICENSE_PUBLIC_KEY, isNoncommercial: inferNoncommercial(), }); diff --git a/apps/website/content/docs/licensing/reference/api.mdx b/apps/website/content/docs/licensing/reference/api.mdx index 607c6504..6962e178 100644 --- a/apps/website/content/docs/licensing/reference/api.mdx +++ b/apps/website/content/docs/licensing/reference/api.mdx @@ -5,7 +5,7 @@ This page documents the public exports from `@threadplane/licensing`. ## Types ```ts -type LicenseTier = 'developer-seat' | 'app-deployment' | 'enterprise'; +type LicenseTier = 'developer_seat' | 'team' | 'enterprise'; interface LicenseClaims { sub: string; @@ -34,6 +34,14 @@ type LicenseStatus = | 'noncommercial'; ``` +```ts +interface EvaluateResult { + status: LicenseStatus; + /** Populated when the token was valid (licensed / grace / expired). */ + claims?: LicenseClaims; +} +``` + ## verifyLicense() ```ts @@ -98,7 +106,7 @@ Runs the full check: 2. evaluates the license status; 3. emits a warning when appropriate. -Repeated calls with the same package and token are treated as already handled and return `licensed`. +Repeated calls with the same package and token are treated as already handled and return the same status computed on the first call (idempotent; not necessarily `licensed`). ## emitNag()