Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Jan 9, 2026

Summary by CodeRabbit

  • New Features

    • Added ExistsArgs type support across all entities for existence queries, enabling more precise query capabilities.
    • Introduced new listPublicPosts procedure for retrieving public posts.
    • Enhanced schema with expanded Post and User model relationships and additional fields.
  • Refactor

    • Consolidated and simplified schema structure for improved readability and maintainability.

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

Copilot AI review requested due to automatic review settings January 9, 2026 09:45
@claude
Copy link

claude bot commented Jan 9, 2026

Claude finished @ymc9's task —— View job


Pull Request Review

I've completed a thorough review of the schema regeneration changes across all 10 files.

Todo List:

  • Analyze the regenerated schema files
  • Check for code quality issues in generated TypeScript
  • Look for potential bugs or inconsistencies
  • Assess security and performance implications
  • Provide comprehensive feedback

Review Summary

This PR contains a clean schema regeneration from ZModel schemas to TypeScript. The changes are machine-generated and follow expected patterns.

Code Quality ✅

Positive aspects:

  • All generated files include proper header warnings about not modifying manually
  • Consistent ESLint disables (/* eslint-disable */) for generated code
  • Proper TypeScript type imports and exports throughout
  • Consistent naming patterns for all type aliases

Main Changes Identified:

  1. Added ExistsArgs types - New ExistsArgs type imports and exports for all models (e.g., UserExistsArgs, PostExistsArgs)
  2. Import formatting standardization - Multi-line imports collapsed to single lines for consistency
  3. Schema definition updates - Simplified attribute structures in schema definitions

Potential Issues & Recommendations

Code Quality Issues: None Found ✅

  • Generated TypeScript is syntactically correct
  • Type definitions follow proper patterns
  • No TypeScript compilation errors expected

Potential Bugs: None Found ✅

  • All model types are properly defined
  • Type parameters are correctly applied
  • Import/export chains are consistent across files

Security Considerations: Safe ✅

  • Generated files don't expose sensitive data
  • No hardcoded secrets or credentials
  • Follows defensive coding patterns with proper typing

Performance Implications: Positive ✅

  • Single-line imports reduce file size and parsing overhead
  • Addition of ExistsArgs types improves type safety for existence checks
  • Generated types enable better TypeScript optimizations

Test Coverage Assessment

Strengths:

  • Changes cover multiple test scenarios (basic, auth-type, default-auth)
  • Real-world schema compatibility validated (cal.com, formbricks, trigger.dev)
  • Both simple (SvelteKit sample) and complex schemas included

Areas that may need attention:

  • Generated types should be validated with actual test runs to ensure runtime compatibility
  • Consider adding type-only tests to verify TypeScript inference works correctly

Recommendations

  1. ✅ Approve for merge - This is a routine schema regeneration with expected improvements
  2. 💡 Consider running tests - Validate that the new ExistsArgs types work correctly in runtime scenarios
  3. 🔄 Document changes - If the ExistsArgs addition is a new feature, consider updating relevant documentation

Conclusion

This is an excellent schema regeneration that:

  • Adds new functionality (ExistsArgs types)
  • Improves code consistency (import formatting)
  • Maintains backward compatibility
  • Follows all established patterns

Recommendation: ✅ APPROVE


@coderabbitai
Copy link

coderabbitai bot commented Jan 9, 2026

📝 Walkthrough

Walkthrough

This change adds ExistsArgs type support across the codebase, restructures schema definitions from verbose to inline representations, consolidates type imports, and removes certain aggregate utilities. The updates span generated input files and sample schema definitions with no runtime behavior changes.

Changes

Cohort / File(s) Summary
Schema restructuring in SvelteKit sample
samples/sveltekit/src/zenstack/schema.ts, samples/sveltekit/src/zenstack/schema-lite.ts
Transitioned from verbose, multi-line model definitions to consolidated inline declarations; added provider, authType, procedures, and plugins members; expanded User and Post models with additional fields and relations
Type export consolidation in SvelteKit input
samples/sveltekit/src/zenstack/input.ts
Consolidated imports, converted type signatures to single-line form, and removed CountArgs/AggregateArgs/GroupByArgs exports for User and Post entities
ExistsArgs type exports across test files
tests/e2e/apps/rally/zenstack/input.ts, tests/e2e/github-repos/cal.com/input.ts, tests/e2e/github-repos/formbricks/input.ts, tests/e2e/github-repos/trigger.dev/input.ts, tests/e2e/orm/schemas/*/input.ts
Added ExistsArgs import alias and new public type exports for entities to support existence checks (e.g., export type UserExistsArgs = $ExistsArgs<$Schema, "User"> across 22–98+ entities per file)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A hop through types, both old and new,
ExistsArgs bloom in every view,
Schemas shrink from lines to one,
The refactoring race is won!
With tidy imports, consolidated care,
Our code's more elegant everywhere!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: regenerate ts schemas' accurately reflects the main purpose of the changeset, which involves regenerating TypeScript schema files across multiple directories.
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

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9033211 and 793eb75.

📒 Files selected for processing (10)
  • samples/sveltekit/src/zenstack/input.ts
  • samples/sveltekit/src/zenstack/schema-lite.ts
  • samples/sveltekit/src/zenstack/schema.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • tests/e2e/github-repos/cal.com/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
🧰 Additional context used
📓 Path-based instructions (1)
tests/e2e/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

E2E tests should validate real-world schema compatibility with established projects

Files:

  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • tests/e2e/github-repos/cal.com/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : ZModel schema files should define database structure and policies that compile to TypeScript via `zenstack generate`
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : Always run `zenstack generate` after modifying ZModel schemas
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to tests/e2e/**/*.{ts,tsx} : E2E tests should validate real-world schema compatibility with established projects

Applied to files:

  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • tests/e2e/github-repos/cal.com/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.test.{ts,tsx} : ORM package tests should include comprehensive client API tests and policy tests

Applied to files:

  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • samples/sveltekit/src/zenstack/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Implement plugin hooks at ORM, Kysely, and entity mutation levels for query interception and customization

Applied to files:

  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • samples/sveltekit/src/zenstack/schema-lite.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • tests/e2e/github-repos/cal.com/input.ts
  • samples/sveltekit/src/zenstack/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to packages/zenstackhq/orm/**/*.{ts,tsx} : Use Kysely as the query builder interface for low-level database queries, avoiding raw SQL when possible

Applied to files:

  • tests/e2e/orm/schemas/auth-type/input.ts
  • tests/e2e/orm/schemas/basic/input.ts
  • tests/e2e/orm/schemas/default-auth/input.ts
  • samples/sveltekit/src/zenstack/schema-lite.ts
  • tests/e2e/github-repos/formbricks/input.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • tests/e2e/github-repos/cal.com/input.ts
  • samples/sveltekit/src/zenstack/input.ts
  • tests/e2e/github-repos/trigger.dev/input.ts
📚 Learning: 2025-11-26T01:55:04.540Z
Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Applies to **/*.zmodel : ZModel schema files should define database structure and policies that compile to TypeScript via `zenstack generate`

Applied to files:

  • tests/e2e/orm/schemas/default-auth/input.ts
  • samples/sveltekit/src/zenstack/schema-lite.ts
  • samples/sveltekit/src/zenstack/schema.ts
  • tests/e2e/apps/rally/zenstack/input.ts
  • samples/sveltekit/src/zenstack/input.ts
📚 Learning: 2025-10-21T16:09:31.218Z
Learnt from: ymc9
Repo: zenstackhq/zenstack-v3 PR: 319
File: packages/runtime/src/client/executor/zenstack-query-executor.ts:63-72
Timestamp: 2025-10-21T16:09:31.218Z
Learning: In ZenStack, TypeDefs can be inherited by models. When a TypeDef contains fields with `map` attributes, those mapped field names need to be processed by the QueryNameMapper since they become part of the inheriting model's schema. Therefore, when checking if a schema has mapped names (e.g., in `schemaHasMappedNames`), both `schema.models` and `schema.typeDefs` must be inspected for `@map` and `map` attributes.

Applied to files:

  • samples/sveltekit/src/zenstack/schema-lite.ts
  • samples/sveltekit/src/zenstack/schema.ts
📚 Learning: 2025-12-30T15:07:10.092Z
Learnt from: mwillbanks
Repo: zenstackhq/zenstack-v3 PR: 550
File: packages/orm/src/client/crud/operations/base.ts:158-159
Timestamp: 2025-12-30T15:07:10.092Z
Learning: In the zenstackhq/zenstack-v3 codebase, ts-expect-error should be heavily avoided in production code (packages/*). It is acceptable in test files but production code should use proper type annotations, type assertions, or refactoring to resolve type errors instead.

Applied to files:

  • tests/e2e/apps/rally/zenstack/input.ts
  • samples/sveltekit/src/zenstack/input.ts
🧬 Code graph analysis (9)
tests/e2e/orm/schemas/auth-type/input.ts (1)
packages/clients/tanstack-query/test/schemas/basic/input.ts (4)
  • FooFindManyArgs (74-74)
  • FooFindUniqueArgs (75-75)
  • FooFindFirstArgs (76-76)
  • FooExistsArgs (77-77)
tests/e2e/orm/schemas/basic/input.ts (3)
tests/e2e/orm/schemas/default-auth/input.ts (5)
  • UserFindManyArgs (11-11)
  • UserFindUniqueArgs (12-12)
  • UserFindFirstArgs (13-13)
  • UserExistsArgs (14-14)
  • ProfileExistsArgs (35-35)
samples/orm/zenstack/input.ts (6)
  • UserFindManyArgs (11-11)
  • UserFindUniqueArgs (12-12)
  • UserFindFirstArgs (13-13)
  • UserExistsArgs (14-14)
  • PostExistsArgs (56-56)
  • ProfileExistsArgs (35-35)
tests/e2e/orm/schemas/name-mapping/input.ts (5)
  • UserFindManyArgs (11-11)
  • UserFindUniqueArgs (12-12)
  • UserFindFirstArgs (13-13)
  • UserExistsArgs (14-14)
  • PostExistsArgs (35-35)
tests/e2e/orm/schemas/default-auth/input.ts (9)
tests/e2e/github-repos/cal.com/input.ts (2)
  • UserExistsArgs (161-161)
  • ProfileExistsArgs (203-203)
tests/e2e/github-repos/formbricks/input.ts (1)
  • UserExistsArgs (518-518)
tests/e2e/github-repos/trigger.dev/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/basic/input.ts (2)
  • UserExistsArgs (14-14)
  • ProfileExistsArgs (77-77)
samples/orm/zenstack/input.ts (2)
  • UserExistsArgs (14-14)
  • ProfileExistsArgs (35-35)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/typing/input.ts (2)
  • UserExistsArgs (14-14)
  • ProfileExistsArgs (56-56)
tests/regression/test/issue-422/input.ts (1)
  • ProfileExistsArgs (56-56)
samples/sveltekit/src/zenstack/schema-lite.ts (1)
packages/schema/src/expression-utils.ts (1)
  • ExpressionUtils (19-123)
samples/sveltekit/src/zenstack/schema.ts (1)
packages/schema/src/expression-utils.ts (1)
  • ExpressionUtils (19-123)
tests/e2e/apps/rally/zenstack/input.ts (15)
tests/e2e/github-repos/cal.com/input.ts (8)
  • AccountFindManyArgs (725-725)
  • AccountFindUniqueArgs (726-726)
  • AccountFindFirstArgs (727-727)
  • AccountExistsArgs (728-728)
  • UserExistsArgs (161-161)
  • VerificationTokenExistsArgs (350-350)
  • SessionExistsArgs (749-749)
  • CredentialExistsArgs (77-77)
tests/e2e/github-repos/formbricks/input.ts (5)
  • AccountFindManyArgs (494-494)
  • AccountFindUniqueArgs (495-495)
  • AccountFindFirstArgs (496-496)
  • AccountExistsArgs (497-497)
  • UserExistsArgs (518-518)
samples/sveltekit/src/zenstack/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/github-repos/trigger.dev/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/basic/input.ts (2)
  • UserExistsArgs (14-14)
  • CommentExistsArgs (56-56)
tests/e2e/orm/schemas/default-auth/input.ts (1)
  • UserExistsArgs (14-14)
samples/orm/zenstack/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/omit/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/petstore/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/typing/input.ts (1)
  • UserExistsArgs (14-14)
samples/next.js/zenstack/input.ts (1)
  • UserExistsArgs (14-14)
packages/clients/tanstack-query/test/schemas/basic/input.ts (1)
  • UserExistsArgs (14-14)
tests/regression/test/issue-422/input.ts (1)
  • SessionExistsArgs (14-14)
tests/e2e/github-repos/cal.com/input.ts (7)
samples/sveltekit/src/zenstack/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/github-repos/trigger.dev/input.ts (1)
  • UserExistsArgs (14-14)
samples/orm/zenstack/input.ts (2)
  • UserExistsArgs (14-14)
  • ProfileExistsArgs (35-35)
tests/e2e/orm/schemas/name-mapping/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/typed-json/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/orm/schemas/todo/input.ts (1)
  • UserExistsArgs (56-56)
tests/regression/test/issue-422/input.ts (2)
  • UserExistsArgs (35-35)
  • ProfileExistsArgs (56-56)
samples/sveltekit/src/zenstack/input.ts (4)
tests/e2e/apps/rally/zenstack/input.ts (11)
  • UserFindManyArgs (32-32)
  • UserFindUniqueArgs (33-33)
  • UserFindFirstArgs (34-34)
  • UserExistsArgs (35-35)
  • UserCreateArgs (36-36)
  • UserCreateManyArgs (37-37)
  • UserCreateManyAndReturnArgs (38-38)
  • UserUpdateArgs (39-39)
  • UserUpdateManyArgs (40-40)
  • UserUpdateManyAndReturnArgs (41-41)
  • UserGetPayload (52-52)
tests/e2e/github-repos/cal.com/input.ts (11)
  • UserFindManyArgs (158-158)
  • UserFindUniqueArgs (159-159)
  • UserFindFirstArgs (160-160)
  • UserExistsArgs (161-161)
  • UserCreateArgs (162-162)
  • UserCreateManyArgs (163-163)
  • UserCreateManyAndReturnArgs (164-164)
  • UserUpdateArgs (165-165)
  • UserUpdateManyArgs (166-166)
  • UserUpdateManyAndReturnArgs (167-167)
  • UserGetPayload (178-178)
tests/e2e/github-repos/formbricks/input.ts (11)
  • UserFindManyArgs (515-515)
  • UserFindUniqueArgs (516-516)
  • UserFindFirstArgs (517-517)
  • UserExistsArgs (518-518)
  • UserCreateArgs (519-519)
  • UserCreateManyArgs (520-520)
  • UserCreateManyAndReturnArgs (521-521)
  • UserUpdateArgs (522-522)
  • UserUpdateManyArgs (523-523)
  • UserUpdateManyAndReturnArgs (524-524)
  • UserGetPayload (535-535)
samples/next.js/zenstack/input.ts (11)
  • UserFindManyArgs (11-11)
  • UserFindUniqueArgs (12-12)
  • UserFindFirstArgs (13-13)
  • UserExistsArgs (14-14)
  • UserCreateArgs (15-15)
  • UserCreateManyArgs (16-16)
  • UserCreateManyAndReturnArgs (17-17)
  • UserUpdateArgs (18-18)
  • UserUpdateManyArgs (19-19)
  • UserUpdateManyAndReturnArgs (20-20)
  • UserGetPayload (31-31)
tests/e2e/github-repos/trigger.dev/input.ts (4)
samples/sveltekit/src/zenstack/input.ts (1)
  • UserExistsArgs (14-14)
tests/e2e/github-repos/cal.com/input.ts (1)
  • UserExistsArgs (161-161)
tests/e2e/github-repos/formbricks/input.ts (2)
  • UserExistsArgs (518-518)
  • OrganizationExistsArgs (392-392)
tests/e2e/orm/schemas/basic/input.ts (1)
  • UserExistsArgs (14-14)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: CodeQL analysis (javascript-typescript)
  • GitHub Check: build-test (22.x, sqlite)
  • GitHub Check: build-test (22.x, postgresql)
  • GitHub Check: claude-review
🔇 Additional comments (11)
tests/e2e/orm/schemas/auth-type/input.ts (1)

9-14: LGTM!

The ExistsArgs import and FooExistsArgs type export follow the established pattern seen across other generated input files (e.g., tests/e2e/orm/schemas/json/input.ts, tests/regression/test/issue-204/input.ts). The type is correctly positioned after FooFindFirstArgs.

tests/e2e/orm/schemas/basic/input.ts (1)

9-9: LGTM!

The ExistsArgs import and corresponding type exports (UserExistsArgs, PostExistsArgs, CommentExistsArgs, ProfileExistsArgs) are correctly added for all entities. The placement after FindFirstArgs is consistent with the established pattern across the codebase.

Also applies to: 14-14, 35-35, 56-56, 77-77

tests/e2e/orm/schemas/default-auth/input.ts (1)

9-9: LGTM!

The ExistsArgs type additions for User, Profile, and Address entities are consistent with the established pattern and match the snippets from other files in the codebase.

Also applies to: 14-14, 35-35, 56-56

samples/sveltekit/src/zenstack/input.ts (1)

9-10: LGTM!

The import consolidation and single-line formatting for CreateManyAndReturnArgs, UpdateManyAndReturnArgs, and GetPayload types are consistent with the generated code patterns. The CountArgs, AggregateArgs, and GroupByArgs types are correctly retained (lines 24-26, 45-47).

Note: The AI summary mentions removal of UserCountArgs, UserAggregateArgs, UserGroupByArgs, PostCountArgs, PostAggregateArgs, PostGroupByArgs, but these types are still present in the code (lines 24-26 and 45-47).

Also applies to: 17-17, 20-20, 31-31, 38-38, 41-41, 52-52

samples/sveltekit/src/zenstack/schema.ts (1)

10-127: LGTM!

The regenerated schema correctly implements:

  • Inline model definitions for User and Post with proper field metadata
  • Relation wiring between Post.authorUser.posts with cascade options
  • ExpressionUtils usage for defaults (cuid, now) and attributes
  • Authentication type, procedures (signUp, listPublicPosts), and plugins configuration

The structure aligns with the SchemaDef interface and is consistent with schema-lite.ts.

samples/sveltekit/src/zenstack/schema-lite.ts (1)

10-118: LGTM!

The lite schema correctly provides a simplified representation:

  • Omits verbose attributes arrays present in the full schema.ts
  • Uses direct default values (e.g., default: false on line 82) instead of ExpressionUtils.literal()
  • Maintains essential field metadata, relations, and procedures
  • Consistent structure with the full schema for runtime compatibility

This aligns with the expected pattern where schema-lite.ts serves as a reduced-verbosity variant for client-side usage.

tests/e2e/github-repos/formbricks/input.ts (1)

9-9: LGTM!

The ExistsArgs type exports are correctly added for all 35 entities in the Formbricks schema, following the established pattern. This E2E test file validates real-world schema compatibility with the Formbricks project, which aligns with the coding guidelines for E2E tests.

Also applies to: 14-14, 35-35, 56-56, 77-77, 98-98, 119-119, 140-140, 161-161, 182-182, 203-203, 224-224, 245-245, 266-266, 287-287, 308-308, 329-329, 350-350, 371-371, 392-392, 413-413, 434-434, 455-455, 476-476, 497-497, 518-518, 539-539, 560-560, 581-581, 602-602, 623-623, 644-644, 665-665, 686-686, 707-707, 728-728

tests/e2e/apps/rally/zenstack/input.ts (1)

9-9: Schema regeneration looks correct.

The ExistsArgs types have been consistently added for all entities following the correct pattern. The import statement properly includes ExistsArgs as $ExistsArgs, and all entity-specific ExistsArgs types follow the format export type <Entity>ExistsArgs = $ExistsArgs<$Schema, "<Entity>">.

Also applies to: 14-14, 35-35, 56-56, 77-77, 98-98, 119-119, 140-140, 161-161, 182-182, 203-203, 224-224, 245-245, 266-266, 287-287, 308-308, 329-329, 350-350, 371-371, 392-392, 413-413, 434-434, 455-455, 476-476, 497-497, 518-518, 539-539, 560-560

tests/e2e/github-repos/cal.com/input.ts (1)

9-9: Schema regeneration completed successfully.

The ExistsArgs types have been systematically added for all entities in the Cal.com schema. The import statement and type exports follow the correct pattern consistently throughout this large schema file.

Based on learnings, this E2E test validates real-world schema compatibility with the established Cal.com project.

Also applies to: 14-14, 35-35, 56-56, 77-77, 98-98

tests/e2e/github-repos/trigger.dev/input.ts (2)

9-9: LGTM: Import statement correctly updated.

The addition of ExistsArgs as $ExistsArgs to the import statement follows the established aliasing pattern and enables the ExistsArgs type exports throughout the file.


14-1064: LGTM: ExistsArgs exports correctly generated.

The ExistsArgs type exports have been consistently added for all entities following the correct pattern: export type {Entity}ExistsArgs = $ExistsArgs<$Schema, "{Entity}">. The additions are positioned appropriately after FindFirstArgs and before CreateArgs for each entity, maintaining consistency throughout the file.

Since this is auto-generated code (as indicated in the file header), the mechanical consistency and correct pattern application are the key quality indicators, both of which are satisfied here.


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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR regenerates TypeScript schema files to add support for the ExistsArgs type across all models. The changes are automated and consistent.

Key Changes:

  • Added ExistsArgs import from @zenstackhq/orm package
  • Added <Model>ExistsArgs type export for each model entity
  • Reformatted schema files with consistent indentation and structure

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/e2e/orm/schemas/default-auth/input.ts Added ExistsArgs import and UserExistsArgs, ProfileExistsArgs, AddressExistsArgs type exports
tests/e2e/orm/schemas/basic/input.ts Added ExistsArgs import and UserExistsArgs, PostExistsArgs, CommentExistsArgs, ProfileExistsArgs type exports
tests/e2e/orm/schemas/auth-type/input.ts Added ExistsArgs import and FooExistsArgs type export
tests/e2e/github-repos/trigger.dev/input.ts Added ExistsArgs import and ExistsArgs type exports for all 48 model entities
tests/e2e/github-repos/formbricks/input.ts Added ExistsArgs import and ExistsArgs type exports for all 37 model entities
tests/e2e/github-repos/cal.com/input.ts Added ExistsArgs import and ExistsArgs type exports for all 91 model entities
tests/e2e/apps/rally/zenstack/input.ts Added ExistsArgs import and ExistsArgs type exports for all 25 model entities
samples/sveltekit/src/zenstack/schema.ts Reformatted with consistent indentation (no functional changes)
samples/sveltekit/src/zenstack/schema-lite.ts Reformatted with consistent indentation (no functional changes)
samples/sveltekit/src/zenstack/input.ts Added ExistsArgs import, UserExistsArgs and PostExistsArgs type exports, consolidated multi-line imports to single lines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ymc9 ymc9 merged commit c4ee20a into dev Jan 9, 2026
10 of 11 checks passed
@ymc9 ymc9 deleted the chore/update-schemas branch January 9, 2026 09: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.

2 participants