codegen library
Typed records from a schema snapshot, behind dart run vaultbase:types.
Not part of package:vaultbase/vaultbase.dart, so apps don't ship it.
Functions
-
codegenHeader(
String command) → String - The do-not-edit banner, naming the command that regenerates the file.
-
generateDart(
List< Map< collections, {String header = '// AUTO-GENERATED by `dart run vaultbase:types`. ' 'Do not edit.\n'}) → StringString, dynamic> > -
Dart source for the collections of a schema snapshot: per collection a
XRecord extends RecordModelwith a getter per field, anXCreate(base and auth collections) withtoJson(), andvb.collections.<name>. -
snapshotCollections(
Object? json) → List< Map< String, dynamic> > -
The collections of a schema snapshot (
GET /api/v1/admin/migrations/snapshot): a[...]list,{collections: [...]}, or either inside the{data: ...}envelope.