Skip to content

docs(repo): Add additional typedoc outputs#8483

Open
SarahSoutoul wants to merge 14 commits intomainfrom
ss/more-typedoc-outputs
Open

docs(repo): Add additional typedoc outputs#8483
SarahSoutoul wants to merge 14 commits intomainfrom
ss/more-typedoc-outputs

Conversation

@SarahSoutoul
Copy link
Copy Markdown
Contributor

@SarahSoutoul SarahSoutoul commented May 5, 2026

Description

This PR is two fold:

  1. It adds changes to bring in Typedoc outputs to help with this PR. The changes are the following:

    • Removed @internal from useOAuthConsent() and its params/return types so Typedoc generates outputs for them that can be used in the docs.
    • Tightened the hook typing so oauthClientId is explicitly required.
    • Added JSDoc comments for OAuthConsentInfo, OAuthConsentScope, and related OAuth consent fields that can be used as types in the docs.
    • Updated .typedoc/custom-plugin.mjs so new generated params/returns/types link correctly in docs.
  2. It adds changes to resolve the issue raised here related to creating a page for enterprise-connection-oauth-config.

    • Updated .typedoc/custom-plugin.mjs so new generated enterprise types link correctly in docs.
    • Improved JSDoc comment for EnterpriseAccountConnection and EnterpriseConnectionSamlConnection backend resource types used in the generated output.

Apart from these two objectives, I also made sure that ClerkAPIResponseError and ClerkAPIError were correctly linked through updates in the .typedoc/custom-plugin.mjs file.

When this is released, I will generate a Typedoc PR in clerk-docs and will add the docs specific changes that are needed to bring all of this together. Once that Typedoc PR is released, we will then be able to modify this PR from @wobsoriano to be using typedoc rather than manual input.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@SarahSoutoul SarahSoutoul self-assigned this May 5, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 5, 2026 9:58pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: 22fe185

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@clerk/backend Patch
@clerk/shared Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/react Patch
@clerk/ui Patch
@clerk/vue Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SarahSoutoul SarahSoutoul changed the title Add additional typedoc outputs docs(repo): Add additional typedoc outputs May 5, 2026
@SarahSoutoul SarahSoutoul changed the title docs(repo): Add additional typedoc outputs docs(repo): Add additional typedoc outputs May 5, 2026
@SarahSoutoul SarahSoutoul marked this pull request as ready for review May 5, 2026 21:34
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

Adds SAML and OAuth nested types to Backend EnterpriseConnection and updates its fromJSON mapping; tightens useOAuthConsent API by making its params and related types required; introduces camelCase public OAuth consent types and removes the optional scope from GetOAuthConsentInfoParams; updates a JSDoc line for EnterpriseAccountConnection; and extends the TypeDoc custom plugin with additional files-to-strip and link-replacement rules (including o-auth-consent entries, enterprise-connection variants, clerk-api-error, and a catch-all for ClerkAPIResponseError).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(repo): Add additional typedoc outputs' is related to part of the changeset (TypeDoc plugin updates) but misses the major functional changes (OAuth consent type tightening and new enterprise connection classes).
Description check ✅ Passed The description comprehensively explains the changeset's two main objectives, related TypeDoc documentation updates, and the planned workflow with linked context.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8483

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8483

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8483

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8483

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8483

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8483

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8483

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8483

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8483

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8483

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8483

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8483

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8483

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8483

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8483

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8483

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8483

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8483

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8483

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8483

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8483

commit: 22fe185

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/shared/src/react/hooks/useOAuthConsent.tsx`:
- Around line 27-30: The hook useOAuthConsent currently destructures params
immediately which crashes when callers omit params; make it runtime-safe by
defaulting params to an empty object (or provide a default in the destructuring)
so the destructuring of oauthClientIdParam, scope, keepPreviousData, and enabled
succeeds even when params is undefined; update the function signature or the
const line that extracts oauthClientId: oauthClientIdParam, scope,
keepPreviousData = true, enabled = true to use a safe default (e.g., params = {}
or ({ ... } = params || {})) and keep the existing empty-client-id fallback
logic intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 0e5af9cc-d8af-4adf-892a-9cfd9f16aea4

📥 Commits

Reviewing files that changed from the base of the PR and between cd6c4b7 and 86427f3.

📒 Files selected for processing (6)
  • .typedoc/custom-plugin.mjs
  • packages/backend/src/api/resources/EnterpriseAccount.ts
  • packages/backend/src/api/resources/EnterpriseConnection.ts
  • packages/shared/src/react/hooks/useOAuthConsent.tsx
  • packages/shared/src/react/hooks/useOAuthConsent.types.ts
  • packages/shared/src/types/oauthApplication.ts

Comment on lines +27 to 30
export function useOAuthConsent(params: UseOAuthConsentParams): UseOAuthConsentReturn {
useAssertWrappedByClerkProvider(HOOK_NAME);

const { oauthClientId: oauthClientIdParam, scope, keepPreviousData = true, enabled = true } = params;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Keep useOAuthConsent() runtime-safe when params are omitted.

Removing the default object turns useOAuthConsent() into a runtime crash for JS/untyped callers: Line 30 destructures params immediately, so useOAuthConsent() now throws before it reaches the existing empty-client-id fallback. That is a breaking behavior change for a public hook in a docs-focused PR.

Suggested fix
 export function useOAuthConsent(params: UseOAuthConsentParams): UseOAuthConsentReturn {
   useAssertWrappedByClerkProvider(HOOK_NAME);
 
-  const { oauthClientId: oauthClientIdParam, scope, keepPreviousData = true, enabled = true } = params;
+  const {
+    oauthClientId: oauthClientIdParam,
+    scope,
+    keepPreviousData = true,
+    enabled = true,
+  } = params ?? ({} as UseOAuthConsentParams);
   const clerk = useClerkInstanceContext();
   const user = useUserBase();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/shared/src/react/hooks/useOAuthConsent.tsx` around lines 27 - 30,
The hook useOAuthConsent currently destructures params immediately which crashes
when callers omit params; make it runtime-safe by defaulting params to an empty
object (or provide a default in the destructuring) so the destructuring of
oauthClientIdParam, scope, keepPreviousData, and enabled succeeds even when
params is undefined; update the function signature or the const line that
extracts oauthClientId: oauthClientIdParam, scope, keepPreviousData = true,
enabled = true to use a safe default (e.g., params = {} or ({ ... } = params ||
{})) and keep the existing empty-client-id fallback logic intact.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.changeset/dry-mice-begin.md (1)

6-6: ⚡ Quick win

Consider a more detailed summary for the changelog.

The current summary "Fix OAuth consent component and hook related types" is quite vague. Based on the PR objectives and AI summary, the changes include:

  • Making oauthClientId required in useOAuthConsent params (was optional)
  • Adding new backend enterprise connection types (EnterpriseConnectionSamlConnection, EnterpriseConnectionOauthConfig)
  • Exposing previously internal OAuth consent types for TypeDoc

A more descriptive summary would help users understand the impact when reading the changelog. For example:

Expose OAuth consent types and enterprise connection nested types for documentation. Make `oauthClientId` required in `useOAuthConsent` to align types with runtime behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/dry-mice-begin.md at line 6, Update the changelog summary to be
more descriptive: replace the vague line "Fix OAuth consent component and hook
related types" with a concise explanation reflecting the actual changes (e.g.,
"Expose OAuth consent types and enterprise connection nested types for
documentation; make `oauthClientId` required in `useOAuthConsent` to align types
with runtime behavior"), and mention the added types
`EnterpriseConnectionSamlConnection` and `EnterpriseConnectionOauthConfig` plus
the exposure of previously internal OAuth consent types for TypeDoc so users
immediately see scope and impact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/dry-mice-begin.md:
- Line 6: Update the changelog sentence "Fix OAuth consent component and hook
related types." to hyphenate the compound modifier by changing it to "Fix OAuth
consent component and hook-related types." Locate the exact string in the
.changeset entry and replace only the phrase "hook related" with "hook-related"
so punctuation and capitalization remain consistent.

---

Nitpick comments:
In @.changeset/dry-mice-begin.md:
- Line 6: Update the changelog summary to be more descriptive: replace the vague
line "Fix OAuth consent component and hook related types" with a concise
explanation reflecting the actual changes (e.g., "Expose OAuth consent types and
enterprise connection nested types for documentation; make `oauthClientId`
required in `useOAuthConsent` to align types with runtime behavior"), and
mention the added types `EnterpriseConnectionSamlConnection` and
`EnterpriseConnectionOauthConfig` plus the exposure of previously internal OAuth
consent types for TypeDoc so users immediately see scope and impact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: b385e1f5-cab1-4173-b00c-64c623024721

📥 Commits

Reviewing files that changed from the base of the PR and between 86427f3 and 1e27689.

📒 Files selected for processing (1)
  • .changeset/dry-mice-begin.md

"@clerk/shared": patch
---

Fix OAuth consent component and hook related types.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix grammar: hyphenate compound modifier.

"hook related types" should be "hook-related types" (hyphenated compound modifier).

📝 Proposed fix
-Fix OAuth consent component and hook related types.
+Fix OAuth consent component and hook-related types.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Fix OAuth consent component and hook related types.
Fix OAuth consent component and hook-related types.
🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: Use a hyphen to join words.
Context: ...-- Fix OAuth consent component and hook related types.

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/dry-mice-begin.md at line 6, Update the changelog sentence "Fix
OAuth consent component and hook related types." to hyphenate the compound
modifier by changing it to "Fix OAuth consent component and hook-related types."
Locate the exact string in the .changeset entry and replace only the phrase
"hook related" with "hook-related" so punctuation and capitalization remain
consistent.

Copy link
Copy Markdown
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@SarahSoutoul
Copy link
Copy Markdown
Contributor Author

@alexisintech Rob and I just finished wrapping up this PR if we could get your eyes on it! Thank you!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants