[PR #5512] [MERGED] fix(organization): fix the schema type #14299

Closed
opened 2026-04-13 09:24:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5512
Author: @himself65
Created: 10/23/2025
Status: Merged
Merged: 10/23/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/10/22/org-schema


📝 Commits (1)

  • e256ba9 fix(organization): fix the schema type

📊 Changes

1 file changed (+76 additions, -76 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/schema.ts (+76 -76)

📄 Description

Summary by cubic

Tightened Organization schema TypeScript types to remove undefined from model and field names, making generated types consistent and preventing optional string issues.

  • Bug Fixes
    • Return string (not string | undefined) for modelName and field keys across organization, team, member, invitation, role, and session types.
    • Ensure additionalFields inference resolves to string without leaking undefined.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5512 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/23/2025 **Status:** ✅ Merged **Merged:** 10/23/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/10/22/org-schema` --- ### 📝 Commits (1) - [`e256ba9`](https://github.com/better-auth/better-auth/commit/e256ba940f8e6a924dc5dcbf84f7df6911c9d310) fix(organization): fix the schema type ### 📊 Changes **1 file changed** (+76 additions, -76 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/schema.ts` (+76 -76) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Tightened Organization schema TypeScript types to remove undefined from model and field names, making generated types consistent and preventing optional string issues. - **Bug Fixes** - Return string (not string | undefined) for modelName and field keys across organization, team, member, invitation, role, and session types. - Ensure additionalFields inference resolves to string without leaking undefined. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 09:24:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14299