js-bao-wss-client / DiscoveredField
Interface: DiscoveredField
YDoc Schema Discovery
Reads meta* YMaps from a YDoc and returns a plain JSON description of the schema. Works with any YDoc — no BaseModel or database needed.
Usage: import { discoverSchema } from "js-bao"; const schema = discoverSchema(yDoc);
Properties
autoAssign?
optionalautoAssign:boolean
default?
optionaldefault:string|number|boolean
indexed?
optionalindexed:boolean
maxCount?
optionalmaxCount:number
maxLength?
optionalmaxLength:number
required?
optionalrequired:boolean
type
type:
string
unique?
optionalunique:boolean