Skip to content

Conversation

jacekradko
Copy link
Member

@jacekradko jacekradko commented Jun 13, 2025

Description

Updating Verification.status type

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:

Summary by CodeRabbit

  • Refactor
    • Improved type safety for verification status and strategy fields, ensuring more precise handling of verification data.

Copy link

changeset-bot bot commented Jun 13, 2025

🦋 Changeset detected

Latest commit: ee90878

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

This PR includes changesets to release 11 packages
Name Type
@clerk/backend Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing 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

Copy link

vercel bot commented Jun 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2025 1:39pm

Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Warning

Rate limit exceeded

@jacekradko has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 55 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0272058 and ee90878.

📒 Files selected for processing (3)
  • .changeset/puny-suns-hug.md (1 hunks)
  • packages/backend/src/api/resources/JSON.ts (2 hunks)
  • packages/backend/src/api/resources/Verification.ts (2 hunks)
📝 Walkthrough

Walkthrough

The changes update type annotations for verification-related properties in both an interface and a class. Specifically, the types for status and strategy are changed from generic string types to the more specific VerificationStatus and VerificationStrategy types, imported from @clerk/types, to enforce stricter typing.

Changes

Files Change Summary
packages/backend/src/api/resources/JSON.ts Updated VerificationJSON interface: status and strategy properties now use stricter types.
packages/backend/src/api/resources/Verification.ts Updated Verification class constructor: status and strategy parameters now use stricter types.
.changeset/puny-suns-hug.md Updated types of Verification.status and Verification.strategy in @clerk/backend package.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

pkg-pr-new bot commented Jun 13, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@6110

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@6110

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@6110

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@6110

@clerk/types

npm i https://pkg.pr.new/@clerk/types@6110

@clerk/upgrade

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

@clerk/vue

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

commit: ee90878

@jacekradko jacekradko requested a review from Copilot June 13, 2025 13:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the type definitions for the Verification.status property to use VerificationStatus for improved type safety. Key changes include:

  • Updating Verification.status type in the Verification resource.
  • Reflecting the same change in the VerificationJSON interface.
  • Including a changeset update to document the patch.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/backend/src/api/resources/Verification.ts Changed status type from string to VerificationStatus
packages/backend/src/api/resources/JSON.ts Aligned VerificationJSON status type with VerificationStatus
.changeset/puny-suns-hug.md Documented the type change for the patch release
Comments suppressed due to low confidence (2)

packages/backend/src/api/resources/Verification.ts:21

  • Consider updating the JSDoc comments above the status property to clearly document the possible values defined in VerificationStatus.
readonly status: VerificationStatus,

packages/backend/src/api/resources/JSON.ts:591

  • Ensure that the documentation for VerificationJSON reflects the updated type, indicating that status is no longer a plain string but a VerificationStatus.
status: VerificationStatus;

@jacekradko jacekradko merged commit 6842ff1 into main Jun 13, 2025
39 checks passed
@jacekradko jacekradko deleted the fix/backend-verification-resource-types branch June 13, 2025 14:51
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.

4 participants