Skip to content

docs: improve typedocs — clean rebase of #2563#2957

Open
Chase Poirier (chasepoirier) wants to merge 44 commits intomasterfrom
refactor/docs-rebase
Open

docs: improve typedocs — clean rebase of #2563#2957
Chase Poirier (chasepoirier) wants to merge 44 commits intomasterfrom
refactor/docs-rebase

Conversation

@chasepoirier
Copy link
Copy Markdown
Contributor

Summary

Clean rebase of #2563 (refactor/docs) onto current master. The original PR accumulated 1,800+ commits due to a bad rebase that replayed the entire repo history. This branch contains only the 43 actual commits (39 from Benedikt Rötsch (@axe312ger) + 4 fixups for imports lost during conflict resolution).

What this PR does:

  • Adds JSDoc descriptions to 124+ PlainClientAPI methods, all entity Props interfaces, and public types in common-types.ts
  • Fixes 76+ TypeDoc warnings (mismatched params, broken links, unused tags)
  • Upgrades typedoc and migrates config from JSON to ESM (typedoc.config.mjs)
  • Adds @module, @category, and @internal tags across all entity files
  • Adds Getting Started doc, version switcher plugin, and improved navigation
  • Structural renames for clarity (Api → API, DefaultParams → PlainClientDefaultParams, clientOptions)
  • Enables excludePrivate/excludeInternal for cleaner generated docs

Before vs after:

Original PR #2563 This PR
Commits 1,823 43
Files changed 549 126
Additions 75,985 5,043
Deletions 5,721 3,961
Build Dirty/conflicted ✅ Passes

Fixup commits (4): Restored imports/exports that were lost when --strategy-option=theirs resolved cherry-pick conflicts — AgentResumeRunPayload, wrapAgentGenerateResponse, wrapSpaceAddOnCollection, and a duplicate import block.

Supersedes #2563.

Test plan

  • npm run build passes locally
  • CI passes on this branch
  • Verify typedoc generation (npm run docs:build) produces correct output
  • Spot-check JSDoc descriptions render correctly in generated docs
  • Confirm no regressions in existing tests

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

* refactor: remove entities barrels file to improve import structure and help with docs generation

* refactor: ensure export types barrel file is used to export types only

* refactor: rename plain/common-types to actually describe what the file contains

* fix: remove confusing outdated ClientParams type and finally export the type for the client creation options

* refactor: rename params to clientOptions in createClient function to ensure naming of variable matches naming of type

* refactor: remove deprecated, unsupported and unused alphaFeatures

* style: remove outdated ts-error comments and add details to still valid ones

* refactor: rename DefaultParams to PlainClientDefaultParams to avoid confusion with legacy client params

* fix: restore non-enumerable toPlainObject compatibility and __VERSION__ ts-expect-error after rebase

* refactor: standardize @private/@internal convention and tag internal types

  - Add @internal to ~80 internal Params types in common-types.ts
  - Switch exported-but-internal symbols from @Private to @internal
    (MakeRequest, MRActions, MROpts, MRReturn, XOR, WrapParams, WrapFn,
    wrap, createPlainClient, all create-*-api types and functions)
  - Add missing @internal to environment template API type and function
  - Fix OptionalDefaults: remove incorrect @Private, add proper JSDoc
  - Mark deprecated type aliases in export-types.ts (AccessTokenProp,
    CreatePATProps, UIExtension, UIExtensionProps, CreateUIExtensionProps)

* refactor: standardize API type naming (Api -> API) and fix duplicate name

  - Rename ContentfulEntryApi to ContentfulEntryAPI
  - Rename ContentfulEnvironmentTemplateApi to ContentfulEnvironmentTemplateAPI
  - Rename ContentfulUIConfigApi to ContentfulUIConfigAPI (create-ui-config-api.ts)
  - Rename ContentfulUIConfigApi to ContentfulUserUIConfigAPI
    (create-user-ui-config-api.ts), fixing duplicate type name bug

* chore: update migration doc with breaking changes

* style: use @returns instead of @return across all JSDoc comments to match TypeDoc standard

* refactor: standardize all @Private tags to @internal across codebase

---------

Co-authored-by: Chase Poirier <chase.poirier@contentful.com>
…ensure naming of variable matches naming of type
…name

  - Rename ContentfulEntryApi to ContentfulEntryAPI
  - Rename ContentfulEnvironmentTemplateApi to ContentfulEnvironmentTemplateAPI
  - Rename ContentfulUIConfigApi to ContentfulUIConfigAPI (create-ui-config-api.ts)
  - Rename ContentfulUIConfigApi to ContentfulUserUIConfigAPI
    (create-user-ui-config-api.ts), fixing duplicate type name bug
@chasepoirier Chase Poirier (chasepoirier) requested a review from a team as a code owner April 1, 2026 17:09
@bito-code-review
Copy link
Copy Markdown

bito-code-review Bot commented Apr 1, 2026

Bito Automatic Review Skipped - Large PR

Bito didn't auto-review this change because the pull request exceeded the line limit. No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.

var newVersion = select.value
var subPath = pathSegments.slice(cmIdx + 2).join('/')
var newUrl = docsBase + '/' + newVersion + '/' + subPath
window.location.href = newUrl

Check failure

Code scanning / CodeQL

DOM text reinterpreted as HTML High documentation

DOM text
is reinterpreted as HTML without escaping meta-characters.

Copilot Autofix

AI about 1 month ago

Copilot could not generate an autofix suggestion

Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants