Skip to content

fix: declare stricter types for the user class#914

Merged
khendrikse merged 1 commit intomainfrom
fix/declare-stricter-types-for-user
Feb 26, 2026
Merged

fix: declare stricter types for the user class#914
khendrikse merged 1 commit intomainfrom
fix/declare-stricter-types-for-user

Conversation

@khendrikse
Copy link
Contributor

@khendrikse khendrikse commented Feb 26, 2026

And this now includes only the fields that will be returned from the backend.

@khendrikse khendrikse requested a review from a team as a code owner February 26, 2026 12:48
@khendrikse khendrikse requested a review from aitchiss February 26, 2026 12:49
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Feb 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

A new AppMetadata interface is introduced in src/user.ts with properties for provider (string), optional roles (string array), and an index signature. This interface replaces the generic Record<string, unknown> type for the app_metadata property across the User and UserData declarations. Additionally, the confirmed_at property is changed from string to string | null in both locations. The new AppMetadata interface is exported in the public API surface via src/index.ts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request has no description provided by the author. Add a pull request description explaining the rationale for these type changes, how they improve type safety, and any potential migration considerations for users.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: declare stricter types for the user class' accurately describes the main change: adding stricter/more specific types (AppMetadata interface) and refining type definitions for UserData and User classes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/declare-stricter-types-for-user

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

@khendrikse khendrikse merged commit 5c24c7a into main Feb 26, 2026
7 checks passed
@khendrikse khendrikse deleted the fix/declare-stricter-types-for-user branch February 26, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug code to address defects in shipped code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants