SIGN IN SIGN UP

convex: add `docValidator`, `schema.doc()` and `schema.id()` (#55915)

- Allow users to use a type-safe ID validator with `schema.id("tablename")`
- Also adds a validator for full table documents with `schema.doc("tablename")`that adds system fields to the table's document
- Implements the latter with a function that can be used standalone with a `docValidator` that takes a table (returned from `defineTable`) and its name (Note: it's a bit awkward that a defined table doesn't know its name!)

GitOrigin-RevId: b7c713e0820e8ecd2f3b5f25546a14ea4b52abd8
I
Ian Macartney committed
1a870301394064e4da22849f87a0df4cfa838e5b
Parent: 8e74208
Committed by Convex, Inc. <no-reply@convex.dev> on 8/8/2026, 3:11:56 AM