Skip to content

refactor: move generateId to Entity options#77

Merged
tonyfromundefined merged 3 commits intomainfrom
tony/move-generateid-to-entity
Mar 16, 2026
Merged

refactor: move generateId to Entity options#77
tonyfromundefined merged 3 commits intomainfrom
tony/move-generateid-to-entity

Conversation

@tonyfromundefined
Copy link
Copy Markdown
Member

Summary

Move ID generation strategy from defineSchema to Entity options to improve separation of concerns. Schema now focuses on data structure and validation, while Entity handles runtime behavior (generateId, maxQueuedEvents).

This makes the API more consistent since maxQueuedEvents was already an Entity option.

Changes

  • Remove generateId from defineSchema options
  • Add generateId to Entity options
  • Remove " $$generateId" from Schema type
  • Update tests to pass generateId to Entity constructor

All 362 tests pass.

🤖 Generated with Claude Code

Move the ID generation strategy from defineSchema to Entity as an option
to better separate concerns. Schema now focuses purely on data structure
and validation, while Entity handles runtime behavior (generateId,
maxQueuedEvents). This improves consistency since maxQueuedEvents was
already an Entity option.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

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

Project Deployment Actions Updated (UTC)
ventyd Ready Ready Preview, Comment Mar 16, 2026 0:57am

@tonyfromundefined tonyfromundefined merged commit 24bd27c into main Mar 16, 2026
3 checks passed
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