Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Nov 27, 2025

Summary by CodeRabbit

  • New Features

    • Added field omission capabilities in ORM across schema, client, and query levels with configurable precedence.
    • Introduced new client properties for accessing schema, options, authentication, and query builder.
    • Added runtime option configuration method to dynamically update client settings.
  • Documentation

    • Added comprehensive guide for field omission functionality in ORM.
    • Updated API reference with newly available client properties and methods.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Nov 27, 2025

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

Project Deployment Preview Comments Updated (UTC)
zenstack-new-site Ready Ready Preview Comment Nov 27, 2025 11:40am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

Two documentation files updated: new versioned docs page describing ORM field omission with three scopes (schema, client, query-level), their precedence rules, configuration methods, and override behavior; and updated API reference documenting new ClientContract properties ($schema, $options, $auth, $qb, $qbRaw), the $setOptions() method, and expanded ClientOptions type with optional omit and plugins fields.

Changes

Cohort / File(s) Summary
ORM Omit Documentation
versioned_docs/version-3.x/orm/api/omit.md
New documentation page explaining field omission at three scopes (schema-level via @omit, client-level, query-level), precedence rules, configuration methods, override behavior, and validation errors under allowQueryTimeOmitOverride setting. Includes code examples for ZModel and TypeScript usage.
API Reference Updates
versioned_docs/version-3.x/reference/api.md
Updated API reference documenting five new ClientContract properties ($schema, $options, $auth, $qb, $qbRaw), new $setOptions() method, and expanded ClientOptions type with optional dialect, plugins, log, fixPostgresTimezone, validateInput, omit, and computedFields fields. Reorganized heading structure and terminology.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify accuracy of documented ClientContract properties and method signatures against actual type definitions
  • Confirm ORM omit scope precedence and override behavior matches implementation
  • Check code examples for correctness and completeness

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'doc: release beta.26' is vague and generic, lacking specific information about the actual changes made to the documentation. Consider a more descriptive title that highlights the main documentation changes, such as 'doc: add omit API documentation and update client contract reference' to better reflect the substantive additions.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/release-beta.26

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e7bb45 and c6fc45b.

📒 Files selected for processing (2)
  • versioned_docs/version-3.x/orm/api/omit.md (1 hunks)
  • versioned_docs/version-3.x/reference/api.md (7 hunks)
🔇 Additional comments (6)
versioned_docs/version-3.x/orm/api/omit.md (2)

74-90: Verify allowQueryTimeOmitOverride is documented in the ClientOptions API reference.

The documentation references allowQueryTimeOmitOverride as a ZenStackClient option, but this field does not appear in the ClientOptions type definition provided in the API reference file (versioned_docs/version-3.x/reference/api.md, lines 30-79). Please verify:

  1. Whether allowQueryTimeOmitOverride should be added to the ClientOptions documentation, or
  2. Whether it's a separate parameter outside ClientOptions, in which case the context here should clarify where it's passed.

1-62: Documentation structure and examples are clear and well-organized.

The omit feature documentation provides good coverage of schema-level, client-level, and query-level omission scopes with appropriate code examples. The info box (lines 12-14) appropriately clarifies scope limitations, and the cross-references to related features are helpful.

versioned_docs/version-3.x/reference/api.md (4)

92-98: Clarify the type annotation for the $options property.

Line 97 documents $options with type Options, which appears to be a generic type parameter. For consistency with the explicit ClientOptions<Schema> shown in the $setOptions method (line 172), consider either:

  1. Making the type parameter explicit: ClientOptions<Schema>, or
  2. Adding a brief comment explaining that Options is a generic type parameter bound to ClientOptions<Schema>.

30-79: Add allowQueryTimeOmitOverride to ClientOptions documentation.

The omit.md documentation demonstrates passing allowQueryTimeOmitOverride to the ZenStackClient constructor (lines 77-80 in omit.md), but this option is not included in the ClientOptions type definition here. Please add this field to the type definition with appropriate documentation:

/**
 * Whether to allow query-time overrides of field omission settings.
 * When set to false, query-time omit negations will raise a validation error.
 * Defaults to true.
 */
allowQueryTimeOmitOverride?: boolean;

Alternatively, if this is intentionally handled outside ClientOptions, please update omit.md to clarify where/how this option is passed.


19-28: Approve constructor signature and options documentation.

The constructor signature update with explicit ClientOptions<Schema> parameter is clear and well-documented. The updated ClientOptions type definition with optional plugins, omit, and computedFields fields properly reflects the new API surface.


131-173: Approve new Properties and $setOptions documentation.

The new introspection properties ($schema, $options, $auth, $qb, $qbRaw) are well-documented with clear descriptions. The $setOptions method documentation includes a practical example demonstrating the spread pattern with db.$options, which aligns well with the omit.md examples.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ymc9 ymc9 merged commit b66373c into main Nov 27, 2025
4 checks passed
@ymc9 ymc9 deleted the docs/release-beta.26 branch November 27, 2025 11:43
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.

2 participants