Skip to content

Add email verification field to user SDK types#74

Merged
jfrench9 merged 1 commit intomainfrom
feature/user-email-verified
Mar 12, 2026
Merged

Add email verification field to user SDK types#74
jfrench9 merged 1 commit intomainfrom
feature/user-email-verified

Conversation

@jfrench9
Copy link
Member

Summary

This PR introduces an email_verified field to the user model in the auto-generated SDK, enabling the application to track and utilize email verification status for users.

Changes

SDK Type Definitions (sdk/types.gen.ts)

  • Added email_verified field to the user type definition, exposing whether a user's email address has been verified
  • Added 6 new lines to support the new field in the generated types

SDK Client (sdk/sdk.gen.ts)

  • Minor updates (2 lines changed) to align the generated SDK client with the updated type definitions and documentation

Key Improvements

  • Email Verification Awareness: The frontend can now access a user's email verification status, enabling conditional UI rendering (e.g., verification banners, restricted feature access, verification prompts)
  • Enhanced User State Management: Components can gate functionality or display appropriate messaging based on whether the user has completed email verification
  • Type Safety: The new field is fully typed in the generated SDK, ensuring compile-time safety when accessing verification status

Breaking Changes

None. This is an additive change — the new email_verified field is added to existing types without modifying or removing any existing fields.

Testing Notes for Reviewers

  1. Type Checking: Verify that the project compiles without errors after the type additions
  2. SDK Regeneration Consistency: Confirm the changes align with the expected SDK generation output (i.e., these changes were properly generated from an updated API spec, not manually edited)
  3. Downstream Usage: Check if any existing components or hooks consume user objects — they should continue to work without modification since the field is additive
  4. Optional vs Required: Verify whether email_verified is marked as optional or required in the type definition, and ensure consuming code handles both cases appropriately (especially for existing users who may not yet have this field populated)

Browser Compatibility

No browser compatibility concerns — these changes are limited to TypeScript type definitions and SDK client code with no DOM, CSS, or browser API dependencies.


🤖 Generated with Claude Code

Branch Info:

  • Source: feature/user-email-verified
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

- Revised comments in `sdk.gen.ts` to enhance clarity regarding shared repositories and their access levels.
- Introduced a new optional field `email_verified` in `UserResponse` type within `types.gen.ts` to indicate whether a user's email is verified, improving user data accuracy and completeness.

These changes aim to improve the SDK's documentation and enhance the user response structure for better integration and usability.
@jfrench9 jfrench9 merged commit 981fe45 into main Mar 12, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/user-email-verified branch March 12, 2026 03:48
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.

1 participant