@sequenceholdings/orm 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +3 -1
  2. package/dist/authoring.cjs +284 -99
  3. package/dist/authoring.cjs.map +1 -1
  4. package/dist/authoring.d.cts +31 -8
  5. package/dist/authoring.d.ts +31 -8
  6. package/dist/authoring.js +282 -100
  7. package/dist/authoring.js.map +1 -1
  8. package/dist/canonical.cjs +51 -3
  9. package/dist/canonical.cjs.map +1 -1
  10. package/dist/canonical.d.cts +838 -12
  11. package/dist/canonical.d.ts +838 -12
  12. package/dist/canonical.js +47 -4
  13. package/dist/canonical.js.map +1 -1
  14. package/dist/cli.cjs +5838 -4197
  15. package/dist/cli.cjs.map +1 -1
  16. package/dist/cli.js +5838 -4197
  17. package/dist/cli.js.map +1 -1
  18. package/dist/client.cjs +49 -32
  19. package/dist/client.cjs.map +1 -1
  20. package/dist/client.d.cts +49 -6
  21. package/dist/client.d.ts +49 -6
  22. package/dist/client.js +49 -32
  23. package/dist/client.js.map +1 -1
  24. package/dist/compiler.cjs +1237 -263
  25. package/dist/compiler.cjs.map +1 -1
  26. package/dist/compiler.d.cts +57 -3
  27. package/dist/compiler.d.ts +57 -3
  28. package/dist/compiler.js +1230 -264
  29. package/dist/compiler.js.map +1 -1
  30. package/dist/{constants-YoFGjIBM.d.cts → constants-C6EG6Wq7.d.cts} +1 -1
  31. package/dist/{constants-YoFGjIBM.d.ts → constants-C6EG6Wq7.d.ts} +1 -1
  32. package/dist/definition-DjfC7Lll.d.cts +91 -0
  33. package/dist/definition-DjfC7Lll.d.ts +91 -0
  34. package/dist/dynamic-input.cjs +2 -1
  35. package/dist/dynamic-input.cjs.map +1 -1
  36. package/dist/dynamic-input.d.cts +9 -2
  37. package/dist/dynamic-input.d.ts +9 -2
  38. package/dist/dynamic-input.js +2 -1
  39. package/dist/dynamic-input.js.map +1 -1
  40. package/dist/index.cjs +1094 -321
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +479 -19
  43. package/dist/index.d.ts +479 -19
  44. package/dist/index.js +1083 -322
  45. package/dist/index.js.map +1 -1
  46. package/dist/ir.cjs +84 -10
  47. package/dist/ir.cjs.map +1 -1
  48. package/dist/ir.d.cts +138 -13
  49. package/dist/ir.d.ts +138 -13
  50. package/dist/ir.js +81 -11
  51. package/dist/ir.js.map +1 -1
  52. package/dist/predicate-v2.cjs +78 -9
  53. package/dist/predicate-v2.cjs.map +1 -1
  54. package/dist/predicate-v2.d.cts +1 -1
  55. package/dist/predicate-v2.d.ts +1 -1
  56. package/dist/predicate-v2.js +78 -9
  57. package/dist/predicate-v2.js.map +1 -1
  58. package/dist/sdl.cjs +156 -21
  59. package/dist/sdl.cjs.map +1 -1
  60. package/dist/sdl.d.cts +8 -1
  61. package/dist/sdl.d.ts +8 -1
  62. package/dist/sdl.js +156 -21
  63. package/dist/sdl.js.map +1 -1
  64. package/package.json +5 -4
  65. package/src/codegen-gql/server-fns.cjs +2 -2
  66. package/templates/orm-namespace/AGENTS.md +10 -0
  67. package/templates/orm-namespace/CLAUDE.md +1 -84
  68. package/templates/orm-namespace/package.json +1 -1
@@ -1,14 +1,26 @@
1
1
  import { z } from 'zod';
2
- import { b as CellPart } from './constants-YoFGjIBM.cjs';
2
+ import { b as CellPart } from './constants-C6EG6Wq7.cjs';
3
3
  export { P as PolicyExpression, p as policyExpressionSchema, a as policyVariantSchema } from './policy-1iZbGnZZ.cjs';
4
4
 
5
+ /** Authored intent only. Operation compilation validates reach; it never adds declarations. */
6
+ declare const ontologyContractSchema: z.ZodObject<{
7
+ version: z.ZodLiteral<1>;
8
+ read: z.ZodDefault<z.ZodArray<z.ZodString>>;
9
+ write: z.ZodDefault<z.ZodArray<z.ZodString>>;
10
+ produce: z.ZodDefault<z.ZodArray<z.ZodString>>;
11
+ invoke: z.ZodDefault<z.ZodArray<z.ZodString>>;
12
+ }, z.core.$strict>;
13
+ type OntologyContract = z.infer<typeof ontologyContractSchema>;
14
+ /** Missing is legacy; present-but-invalid fails closed, including null. */
15
+ declare function readOntologyContract(manifest: unknown): OntologyContract | undefined;
16
+
5
17
  /**
6
18
  * Canonical contract for resolved tables: one logical table (a generated
7
19
  * managed view) backed by N source tables of three kinds —
8
20
  *
9
21
  * - `manual` an internal ORM table holding sparse user edits (the only
10
22
  * GraphQL mutation target),
11
- * - `etl` a synced (`source: gold.*`) table fed by a pipeline,
23
+ * - `etl` a synced (`source: schema.table`) table fed by a pipeline,
12
24
  * - `prefetch` an internal ORM "live" table filled by a function that reads
13
25
  * the source system on demand (and confirms writebacks).
14
26
  *
@@ -312,8 +324,8 @@ declare const canonicalColumnSchema: z.ZodObject<{
312
324
  type: z.ZodUnion<readonly [z.ZodEnum<{
313
325
  bigint: "bigint";
314
326
  boolean: "boolean";
315
- text: "text";
316
327
  date: "date";
328
+ text: "text";
317
329
  timestamptz: "timestamptz";
318
330
  jsonb: "jsonb";
319
331
  uuid: "uuid";
@@ -357,6 +369,7 @@ declare const canonicalLinkSchema: z.ZodObject<{
357
369
  toPlatformUser: "toPlatformUser";
358
370
  }>;
359
371
  target: z.ZodOptional<z.ZodString>;
372
+ namespace: z.ZodOptional<z.ZodString>;
360
373
  on: z.ZodString;
361
374
  references: z.ZodOptional<z.ZodString>;
362
375
  enforce: z.ZodDefault<z.ZodBoolean>;
@@ -446,8 +459,8 @@ declare const canonicalActionSchema: z.ZodObject<{
446
459
  type: z.ZodEnum<{
447
460
  bigint: "bigint";
448
461
  boolean: "boolean";
449
- text: "text";
450
462
  date: "date";
463
+ text: "text";
451
464
  timestamptz: "timestamptz";
452
465
  jsonb: "jsonb";
453
466
  uuid: "uuid";
@@ -516,6 +529,7 @@ declare const canonicalForeignKeySchema: z.ZodObject<{
516
529
  type CanonicalForeignKey = z.infer<typeof canonicalForeignKeySchema>;
517
530
  declare const canonicalTableSchema: z.ZodObject<{
518
531
  table: z.ZodString;
532
+ displayName: z.ZodOptional<z.ZodString>;
519
533
  description: z.ZodOptional<z.ZodString>;
520
534
  renamedFrom: z.ZodOptional<z.ZodString>;
521
535
  source: z.ZodOptional<z.ZodString>;
@@ -525,8 +539,8 @@ declare const canonicalTableSchema: z.ZodObject<{
525
539
  type: z.ZodUnion<readonly [z.ZodEnum<{
526
540
  bigint: "bigint";
527
541
  boolean: "boolean";
528
- text: "text";
529
542
  date: "date";
543
+ text: "text";
530
544
  timestamptz: "timestamptz";
531
545
  jsonb: "jsonb";
532
546
  uuid: "uuid";
@@ -570,6 +584,7 @@ declare const canonicalTableSchema: z.ZodObject<{
570
584
  toPlatformUser: "toPlatformUser";
571
585
  }>;
572
586
  target: z.ZodOptional<z.ZodString>;
587
+ namespace: z.ZodOptional<z.ZodString>;
573
588
  on: z.ZodString;
574
589
  references: z.ZodOptional<z.ZodString>;
575
590
  enforce: z.ZodDefault<z.ZodBoolean>;
@@ -639,8 +654,8 @@ declare const canonicalTableSchema: z.ZodObject<{
639
654
  type: z.ZodEnum<{
640
655
  bigint: "bigint";
641
656
  boolean: "boolean";
642
- text: "text";
643
657
  date: "date";
658
+ text: "text";
644
659
  timestamptz: "timestamptz";
645
660
  jsonb: "jsonb";
646
661
  uuid: "uuid";
@@ -710,8 +725,8 @@ declare const canonicalViewSchema: z.ZodObject<{
710
725
  type: z.ZodUnion<readonly [z.ZodEnum<{
711
726
  bigint: "bigint";
712
727
  boolean: "boolean";
713
- text: "text";
714
728
  date: "date";
729
+ text: "text";
715
730
  timestamptz: "timestamptz";
716
731
  jsonb: "jsonb";
717
732
  uuid: "uuid";
@@ -755,6 +770,7 @@ declare const canonicalViewSchema: z.ZodObject<{
755
770
  toPlatformUser: "toPlatformUser";
756
771
  }>;
757
772
  target: z.ZodOptional<z.ZodString>;
773
+ namespace: z.ZodOptional<z.ZodString>;
758
774
  on: z.ZodString;
759
775
  references: z.ZodOptional<z.ZodString>;
760
776
  enforce: z.ZodDefault<z.ZodBoolean>;
@@ -893,7 +909,24 @@ interface TrackedShape {
893
909
  }
894
910
  /** Columns a cell-tracking table stamps: everything except the primary key, clock columns and cell parts. */
895
911
  declare function trackedCellColumns<T extends TrackedShape>(table: T): Array<T['columns'][number]>;
896
- declare const canonicalDefinitionSchema: z.ZodObject<{
912
+ declare const exportGateSchema: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
913
+ capability: z.ZodString;
914
+ }, z.core.$strict>, z.ZodObject<{
915
+ role: z.ZodString;
916
+ }, z.core.$strict>]>;
917
+ declare const relationExportSchema: z.ZodObject<{
918
+ read: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
919
+ capability: z.ZodString;
920
+ }, z.core.$strict>, z.ZodObject<{
921
+ role: z.ZodString;
922
+ }, z.core.$strict>]>;
923
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
924
+ capability: z.ZodString;
925
+ }, z.core.$strict>, z.ZodObject<{
926
+ role: z.ZodString;
927
+ }, z.core.$strict>]>>;
928
+ }, z.core.$strict>;
929
+ declare const localDefinitionSchema: z.ZodObject<{
897
930
  definition_format: z.ZodLiteral<2>;
898
931
  namespace: z.ZodString;
899
932
  description: z.ZodOptional<z.ZodString>;
@@ -903,6 +936,7 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
903
936
  }, z.core.$strip>>>;
904
937
  tables: z.ZodArray<z.ZodObject<{
905
938
  table: z.ZodString;
939
+ displayName: z.ZodOptional<z.ZodString>;
906
940
  description: z.ZodOptional<z.ZodString>;
907
941
  renamedFrom: z.ZodOptional<z.ZodString>;
908
942
  source: z.ZodOptional<z.ZodString>;
@@ -912,8 +946,8 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
912
946
  type: z.ZodUnion<readonly [z.ZodEnum<{
913
947
  bigint: "bigint";
914
948
  boolean: "boolean";
915
- text: "text";
916
949
  date: "date";
950
+ text: "text";
917
951
  timestamptz: "timestamptz";
918
952
  jsonb: "jsonb";
919
953
  uuid: "uuid";
@@ -957,6 +991,7 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
957
991
  toPlatformUser: "toPlatformUser";
958
992
  }>;
959
993
  target: z.ZodOptional<z.ZodString>;
994
+ namespace: z.ZodOptional<z.ZodString>;
960
995
  on: z.ZodString;
961
996
  references: z.ZodOptional<z.ZodString>;
962
997
  enforce: z.ZodDefault<z.ZodBoolean>;
@@ -1026,8 +1061,8 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1026
1061
  type: z.ZodEnum<{
1027
1062
  bigint: "bigint";
1028
1063
  boolean: "boolean";
1029
- text: "text";
1030
1064
  date: "date";
1065
+ text: "text";
1031
1066
  timestamptz: "timestamptz";
1032
1067
  jsonb: "jsonb";
1033
1068
  uuid: "uuid";
@@ -1096,8 +1131,8 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1096
1131
  type: z.ZodUnion<readonly [z.ZodEnum<{
1097
1132
  bigint: "bigint";
1098
1133
  boolean: "boolean";
1099
- text: "text";
1100
1134
  date: "date";
1135
+ text: "text";
1101
1136
  timestamptz: "timestamptz";
1102
1137
  jsonb: "jsonb";
1103
1138
  uuid: "uuid";
@@ -1141,6 +1176,7 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1141
1176
  toPlatformUser: "toPlatformUser";
1142
1177
  }>;
1143
1178
  target: z.ZodOptional<z.ZodString>;
1179
+ namespace: z.ZodOptional<z.ZodString>;
1144
1180
  on: z.ZodString;
1145
1181
  references: z.ZodOptional<z.ZodString>;
1146
1182
  enforce: z.ZodDefault<z.ZodBoolean>;
@@ -1262,11 +1298,801 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1262
1298
  }, z.core.$strict>>;
1263
1299
  internal: z.ZodOptional<z.ZodLiteral<true>>;
1264
1300
  }, z.core.$strip>>>;
1301
+ exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1302
+ read: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1303
+ capability: z.ZodString;
1304
+ }, z.core.$strict>, z.ZodObject<{
1305
+ role: z.ZodString;
1306
+ }, z.core.$strict>]>;
1307
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1308
+ capability: z.ZodString;
1309
+ }, z.core.$strict>, z.ZodObject<{
1310
+ role: z.ZodString;
1311
+ }, z.core.$strict>]>>;
1312
+ }, z.core.$strict>>>;
1265
1313
  capabilities: z.ZodDefault<z.ZodObject<{
1266
1314
  roles: z.ZodOptional<z.ZodUnknown>;
1267
1315
  uses: z.ZodDefault<z.ZodArray<z.ZodString>>;
1268
1316
  }, z.core.$strip>>;
1269
1317
  }, z.core.$strip>;
1318
+ declare const canonicalDefinitionSchema: z.ZodObject<{
1319
+ definition_format: z.ZodLiteral<2>;
1320
+ namespace: z.ZodString;
1321
+ description: z.ZodOptional<z.ZodString>;
1322
+ enums: z.ZodDefault<z.ZodArray<z.ZodObject<{
1323
+ name: z.ZodString;
1324
+ values: z.ZodArray<z.ZodString>;
1325
+ }, z.core.$strip>>>;
1326
+ tables: z.ZodArray<z.ZodObject<{
1327
+ table: z.ZodString;
1328
+ displayName: z.ZodOptional<z.ZodString>;
1329
+ description: z.ZodOptional<z.ZodString>;
1330
+ renamedFrom: z.ZodOptional<z.ZodString>;
1331
+ source: z.ZodOptional<z.ZodString>;
1332
+ columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
1333
+ name: z.ZodString;
1334
+ columnName: z.ZodString;
1335
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1336
+ bigint: "bigint";
1337
+ boolean: "boolean";
1338
+ date: "date";
1339
+ text: "text";
1340
+ timestamptz: "timestamptz";
1341
+ jsonb: "jsonb";
1342
+ uuid: "uuid";
1343
+ integer: "integer";
1344
+ numeric: "numeric";
1345
+ double: "double";
1346
+ }>, z.ZodObject<{
1347
+ enum: z.ZodString;
1348
+ }, z.core.$strip>]>;
1349
+ nullable: z.ZodDefault<z.ZodBoolean>;
1350
+ unique: z.ZodDefault<z.ZodBoolean>;
1351
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
1352
+ defaultFn: z.ZodOptional<z.ZodEnum<{
1353
+ "gen_random_uuid()": "gen_random_uuid()";
1354
+ "now()": "now()";
1355
+ }>>;
1356
+ onUpdateFn: z.ZodOptional<z.ZodEnum<{
1357
+ "now()": "now()";
1358
+ }>>;
1359
+ description: z.ZodOptional<z.ZodString>;
1360
+ renamedFrom: z.ZodOptional<z.ZodString>;
1361
+ cast: z.ZodOptional<z.ZodString>;
1362
+ deprecated: z.ZodDefault<z.ZodBoolean>;
1363
+ cell: z.ZodOptional<z.ZodObject<{
1364
+ of: z.ZodString;
1365
+ part: z.ZodEnum<{
1366
+ at: "at";
1367
+ by: "by";
1368
+ rev: "rev";
1369
+ source: "source";
1370
+ conflicts: "conflicts";
1371
+ }>;
1372
+ }, z.core.$strict>>;
1373
+ }, z.core.$strip>>>;
1374
+ primaryKey: z.ZodOptional<z.ZodArray<z.ZodString>>;
1375
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1376
+ name: z.ZodString;
1377
+ kind: z.ZodEnum<{
1378
+ toOne: "toOne";
1379
+ toMany: "toMany";
1380
+ toPlatformUser: "toPlatformUser";
1381
+ }>;
1382
+ target: z.ZodOptional<z.ZodString>;
1383
+ namespace: z.ZodOptional<z.ZodString>;
1384
+ on: z.ZodString;
1385
+ references: z.ZodOptional<z.ZodString>;
1386
+ enforce: z.ZodDefault<z.ZodBoolean>;
1387
+ onDelete: z.ZodOptional<z.ZodEnum<{
1388
+ cascade: "cascade";
1389
+ restrict: "restrict";
1390
+ "no action": "no action";
1391
+ "set null": "set null";
1392
+ "set default": "set default";
1393
+ }>>;
1394
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1395
+ cascade: "cascade";
1396
+ restrict: "restrict";
1397
+ "no action": "no action";
1398
+ "set null": "set null";
1399
+ "set default": "set default";
1400
+ }>>;
1401
+ description: z.ZodOptional<z.ZodString>;
1402
+ }, z.core.$strip>>>;
1403
+ indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
1404
+ columns: z.ZodArray<z.ZodString>;
1405
+ unique: z.ZodDefault<z.ZodBoolean>;
1406
+ name: z.ZodOptional<z.ZodString>;
1407
+ }, z.core.$strip>>>;
1408
+ checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1409
+ name: z.ZodString;
1410
+ expression: z.ZodString;
1411
+ }, z.core.$strict>>>;
1412
+ policies: z.ZodDefault<z.ZodObject<{
1413
+ read: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1414
+ default: z.ZodString;
1415
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1416
+ when: z.ZodString;
1417
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1418
+ policy: z.ZodOptional<z.ZodString>;
1419
+ }, z.core.$strip>>>;
1420
+ }, z.core.$strip>]>>;
1421
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1422
+ default: z.ZodString;
1423
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1424
+ when: z.ZodString;
1425
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1426
+ policy: z.ZodOptional<z.ZodString>;
1427
+ }, z.core.$strip>>>;
1428
+ }, z.core.$strip>]>>;
1429
+ insert: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1430
+ default: z.ZodString;
1431
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1432
+ when: z.ZodString;
1433
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1434
+ policy: z.ZodOptional<z.ZodString>;
1435
+ }, z.core.$strip>>>;
1436
+ }, z.core.$strip>]>>;
1437
+ update: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1438
+ default: z.ZodString;
1439
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1440
+ when: z.ZodString;
1441
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1442
+ policy: z.ZodOptional<z.ZodString>;
1443
+ }, z.core.$strip>>>;
1444
+ }, z.core.$strip>]>>;
1445
+ }, z.core.$strip>>;
1446
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1447
+ name: z.ZodString;
1448
+ requires: z.ZodOptional<z.ZodString>;
1449
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1450
+ type: z.ZodEnum<{
1451
+ bigint: "bigint";
1452
+ boolean: "boolean";
1453
+ date: "date";
1454
+ text: "text";
1455
+ timestamptz: "timestamptz";
1456
+ jsonb: "jsonb";
1457
+ uuid: "uuid";
1458
+ integer: "integer";
1459
+ numeric: "numeric";
1460
+ double: "double";
1461
+ }>;
1462
+ nullable: z.ZodDefault<z.ZodBoolean>;
1463
+ }, z.core.$strip>>>;
1464
+ executes: z.ZodString;
1465
+ returns: z.ZodDefault<z.ZodEnum<{
1466
+ rows: "rows";
1467
+ rowsAffected: "rowsAffected";
1468
+ scalar: "scalar";
1469
+ }>>;
1470
+ audit: z.ZodOptional<z.ZodObject<{
1471
+ action: z.ZodString;
1472
+ resource: z.ZodString;
1473
+ }, z.core.$strip>>;
1474
+ }, z.core.$strip>>>;
1475
+ cowMutations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1476
+ kind: z.ZodEnum<{
1477
+ override: "override";
1478
+ revert: "revert";
1479
+ }>;
1480
+ name: z.ZodString;
1481
+ synced: z.ZodString;
1482
+ pk: z.ZodString;
1483
+ copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
1484
+ set: z.ZodDefault<z.ZodArray<z.ZodString>>;
1485
+ }, z.core.$strip>>>;
1486
+ foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
1487
+ name: z.ZodString;
1488
+ columns: z.ZodArray<z.ZodString>;
1489
+ target: z.ZodString;
1490
+ references: z.ZodArray<z.ZodString>;
1491
+ deferrable: z.ZodOptional<z.ZodEnum<{
1492
+ "initially-immediate": "initially-immediate";
1493
+ "initially-deferred": "initially-deferred";
1494
+ }>>;
1495
+ onDelete: z.ZodOptional<z.ZodEnum<{
1496
+ cascade: "cascade";
1497
+ restrict: "restrict";
1498
+ "no action": "no action";
1499
+ "set null": "set null";
1500
+ "set default": "set default";
1501
+ }>>;
1502
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1503
+ cascade: "cascade";
1504
+ restrict: "restrict";
1505
+ "no action": "no action";
1506
+ "set null": "set null";
1507
+ "set default": "set default";
1508
+ }>>;
1509
+ }, z.core.$strict>>>;
1510
+ cellMetadata: z.ZodOptional<z.ZodLiteral<true>>;
1511
+ internal: z.ZodOptional<z.ZodLiteral<true>>;
1512
+ materializes: z.ZodOptional<z.ZodString>;
1513
+ }, z.core.$strip>>;
1514
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
1515
+ view: z.ZodString;
1516
+ description: z.ZodOptional<z.ZodString>;
1517
+ columns: z.ZodArray<z.ZodObject<{
1518
+ name: z.ZodString;
1519
+ columnName: z.ZodString;
1520
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1521
+ bigint: "bigint";
1522
+ boolean: "boolean";
1523
+ date: "date";
1524
+ text: "text";
1525
+ timestamptz: "timestamptz";
1526
+ jsonb: "jsonb";
1527
+ uuid: "uuid";
1528
+ integer: "integer";
1529
+ numeric: "numeric";
1530
+ double: "double";
1531
+ }>, z.ZodObject<{
1532
+ enum: z.ZodString;
1533
+ }, z.core.$strip>]>;
1534
+ nullable: z.ZodDefault<z.ZodBoolean>;
1535
+ unique: z.ZodDefault<z.ZodBoolean>;
1536
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
1537
+ defaultFn: z.ZodOptional<z.ZodEnum<{
1538
+ "gen_random_uuid()": "gen_random_uuid()";
1539
+ "now()": "now()";
1540
+ }>>;
1541
+ onUpdateFn: z.ZodOptional<z.ZodEnum<{
1542
+ "now()": "now()";
1543
+ }>>;
1544
+ description: z.ZodOptional<z.ZodString>;
1545
+ renamedFrom: z.ZodOptional<z.ZodString>;
1546
+ cast: z.ZodOptional<z.ZodString>;
1547
+ deprecated: z.ZodDefault<z.ZodBoolean>;
1548
+ cell: z.ZodOptional<z.ZodObject<{
1549
+ of: z.ZodString;
1550
+ part: z.ZodEnum<{
1551
+ at: "at";
1552
+ by: "by";
1553
+ rev: "rev";
1554
+ source: "source";
1555
+ conflicts: "conflicts";
1556
+ }>;
1557
+ }, z.core.$strict>>;
1558
+ }, z.core.$strip>>;
1559
+ primaryKey: z.ZodOptional<z.ZodArray<z.ZodString>>;
1560
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1561
+ name: z.ZodString;
1562
+ kind: z.ZodEnum<{
1563
+ toOne: "toOne";
1564
+ toMany: "toMany";
1565
+ toPlatformUser: "toPlatformUser";
1566
+ }>;
1567
+ target: z.ZodOptional<z.ZodString>;
1568
+ namespace: z.ZodOptional<z.ZodString>;
1569
+ on: z.ZodString;
1570
+ references: z.ZodOptional<z.ZodString>;
1571
+ enforce: z.ZodDefault<z.ZodBoolean>;
1572
+ onDelete: z.ZodOptional<z.ZodEnum<{
1573
+ cascade: "cascade";
1574
+ restrict: "restrict";
1575
+ "no action": "no action";
1576
+ "set null": "set null";
1577
+ "set default": "set default";
1578
+ }>>;
1579
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1580
+ cascade: "cascade";
1581
+ restrict: "restrict";
1582
+ "no action": "no action";
1583
+ "set null": "set null";
1584
+ "set default": "set default";
1585
+ }>>;
1586
+ description: z.ZodOptional<z.ZodString>;
1587
+ }, z.core.$strip>>>;
1588
+ policies: z.ZodObject<{
1589
+ read: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1590
+ default: z.ZodString;
1591
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1592
+ when: z.ZodString;
1593
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1594
+ policy: z.ZodOptional<z.ZodString>;
1595
+ }, z.core.$strip>>>;
1596
+ }, z.core.$strip>]>;
1597
+ }, z.core.$strict>;
1598
+ query: z.ZodString;
1599
+ dependencies: z.ZodArray<z.ZodString>;
1600
+ resolved: z.ZodOptional<z.ZodObject<{
1601
+ sources: z.ZodArray<z.ZodObject<{
1602
+ name: z.ZodString;
1603
+ kind: z.ZodEnum<{
1604
+ manual: "manual";
1605
+ prefetch: "prefetch";
1606
+ etl: "etl";
1607
+ }>;
1608
+ table: z.ZodString;
1609
+ columns: z.ZodArray<z.ZodString>;
1610
+ updatedAt: z.ZodOptional<z.ZodString>;
1611
+ key: z.ZodOptional<z.ZodString>;
1612
+ fetch: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1613
+ shape: z.ZodLiteral<"single">;
1614
+ }, z.core.$strict>, z.ZodObject<{
1615
+ shape: z.ZodLiteral<"batch">;
1616
+ maxKeys: z.ZodNumber;
1617
+ }, z.core.$strict>]>>;
1618
+ function: z.ZodOptional<z.ZodObject<{
1619
+ kind: z.ZodEnum<{
1620
+ managed: "managed";
1621
+ native: "native";
1622
+ }>;
1623
+ id: z.ZodString;
1624
+ }, z.core.$strict>>;
1625
+ prefetchDefaults: z.ZodOptional<z.ZodObject<{
1626
+ maxStalenessMs: z.ZodNumber;
1627
+ timeoutMs: z.ZodNumber;
1628
+ onError: z.ZodEnum<{
1629
+ fallback: "fallback";
1630
+ fail: "fail";
1631
+ }>;
1632
+ }, z.core.$strict>>;
1633
+ writeback: z.ZodOptional<z.ZodObject<{
1634
+ columns: z.ZodArray<z.ZodString>;
1635
+ defaultMode: z.ZodEnum<{
1636
+ sync: "sync";
1637
+ async: "async";
1638
+ }>;
1639
+ timeoutMs: z.ZodNumber;
1640
+ clearManualOnConfirm: z.ZodBoolean;
1641
+ }, z.core.$strict>>;
1642
+ }, z.core.$strict>>;
1643
+ resolve: z.ZodArray<z.ZodObject<{
1644
+ column: z.ZodString;
1645
+ comparator: z.ZodEnum<{
1646
+ custom: "custom";
1647
+ latest: "latest";
1648
+ highest: "highest";
1649
+ lowest: "lowest";
1650
+ priority: "priority";
1651
+ nonNullFirst: "nonNullFirst";
1652
+ }>;
1653
+ candidates: z.ZodArray<z.ZodString>;
1654
+ orderBy: z.ZodOptional<z.ZodString>;
1655
+ }, z.core.$strict>>;
1656
+ deletedBy: z.ZodDefault<z.ZodArray<z.ZodString>>;
1657
+ materialized: z.ZodOptional<z.ZodObject<{
1658
+ table: z.ZodString;
1659
+ compute: z.ZodString;
1660
+ }, z.core.$strict>>;
1661
+ policies: z.ZodDefault<z.ZodObject<{
1662
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1663
+ default: z.ZodString;
1664
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1665
+ when: z.ZodString;
1666
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1667
+ policy: z.ZodOptional<z.ZodString>;
1668
+ }, z.core.$strip>>>;
1669
+ }, z.core.$strip>]>>;
1670
+ insert: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1671
+ default: z.ZodString;
1672
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1673
+ when: z.ZodString;
1674
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1675
+ policy: z.ZodOptional<z.ZodString>;
1676
+ }, z.core.$strip>>>;
1677
+ }, z.core.$strip>]>>;
1678
+ update: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1679
+ default: z.ZodString;
1680
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1681
+ when: z.ZodString;
1682
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1683
+ policy: z.ZodOptional<z.ZodString>;
1684
+ }, z.core.$strip>>>;
1685
+ }, z.core.$strip>]>>;
1686
+ }, z.core.$strict>>;
1687
+ }, z.core.$strict>>;
1688
+ internal: z.ZodOptional<z.ZodLiteral<true>>;
1689
+ }, z.core.$strip>>>;
1690
+ exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1691
+ read: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1692
+ capability: z.ZodString;
1693
+ }, z.core.$strict>, z.ZodObject<{
1694
+ role: z.ZodString;
1695
+ }, z.core.$strict>]>;
1696
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1697
+ capability: z.ZodString;
1698
+ }, z.core.$strict>, z.ZodObject<{
1699
+ role: z.ZodString;
1700
+ }, z.core.$strict>]>>;
1701
+ }, z.core.$strict>>>;
1702
+ capabilities: z.ZodDefault<z.ZodObject<{
1703
+ roles: z.ZodOptional<z.ZodUnknown>;
1704
+ uses: z.ZodDefault<z.ZodArray<z.ZodString>>;
1705
+ }, z.core.$strip>>;
1706
+ imports: z.ZodOptional<z.ZodArray<z.ZodObject<{
1707
+ definition_format: z.ZodLiteral<2>;
1708
+ namespace: z.ZodString;
1709
+ description: z.ZodOptional<z.ZodString>;
1710
+ enums: z.ZodDefault<z.ZodArray<z.ZodObject<{
1711
+ name: z.ZodString;
1712
+ values: z.ZodArray<z.ZodString>;
1713
+ }, z.core.$strip>>>;
1714
+ tables: z.ZodArray<z.ZodObject<{
1715
+ table: z.ZodString;
1716
+ displayName: z.ZodOptional<z.ZodString>;
1717
+ description: z.ZodOptional<z.ZodString>;
1718
+ renamedFrom: z.ZodOptional<z.ZodString>;
1719
+ source: z.ZodOptional<z.ZodString>;
1720
+ columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
1721
+ name: z.ZodString;
1722
+ columnName: z.ZodString;
1723
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1724
+ bigint: "bigint";
1725
+ boolean: "boolean";
1726
+ date: "date";
1727
+ text: "text";
1728
+ timestamptz: "timestamptz";
1729
+ jsonb: "jsonb";
1730
+ uuid: "uuid";
1731
+ integer: "integer";
1732
+ numeric: "numeric";
1733
+ double: "double";
1734
+ }>, z.ZodObject<{
1735
+ enum: z.ZodString;
1736
+ }, z.core.$strip>]>;
1737
+ nullable: z.ZodDefault<z.ZodBoolean>;
1738
+ unique: z.ZodDefault<z.ZodBoolean>;
1739
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
1740
+ defaultFn: z.ZodOptional<z.ZodEnum<{
1741
+ "gen_random_uuid()": "gen_random_uuid()";
1742
+ "now()": "now()";
1743
+ }>>;
1744
+ onUpdateFn: z.ZodOptional<z.ZodEnum<{
1745
+ "now()": "now()";
1746
+ }>>;
1747
+ description: z.ZodOptional<z.ZodString>;
1748
+ renamedFrom: z.ZodOptional<z.ZodString>;
1749
+ cast: z.ZodOptional<z.ZodString>;
1750
+ deprecated: z.ZodDefault<z.ZodBoolean>;
1751
+ cell: z.ZodOptional<z.ZodObject<{
1752
+ of: z.ZodString;
1753
+ part: z.ZodEnum<{
1754
+ at: "at";
1755
+ by: "by";
1756
+ rev: "rev";
1757
+ source: "source";
1758
+ conflicts: "conflicts";
1759
+ }>;
1760
+ }, z.core.$strict>>;
1761
+ }, z.core.$strip>>>;
1762
+ primaryKey: z.ZodOptional<z.ZodArray<z.ZodString>>;
1763
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1764
+ name: z.ZodString;
1765
+ kind: z.ZodEnum<{
1766
+ toOne: "toOne";
1767
+ toMany: "toMany";
1768
+ toPlatformUser: "toPlatformUser";
1769
+ }>;
1770
+ target: z.ZodOptional<z.ZodString>;
1771
+ namespace: z.ZodOptional<z.ZodString>;
1772
+ on: z.ZodString;
1773
+ references: z.ZodOptional<z.ZodString>;
1774
+ enforce: z.ZodDefault<z.ZodBoolean>;
1775
+ onDelete: z.ZodOptional<z.ZodEnum<{
1776
+ cascade: "cascade";
1777
+ restrict: "restrict";
1778
+ "no action": "no action";
1779
+ "set null": "set null";
1780
+ "set default": "set default";
1781
+ }>>;
1782
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1783
+ cascade: "cascade";
1784
+ restrict: "restrict";
1785
+ "no action": "no action";
1786
+ "set null": "set null";
1787
+ "set default": "set default";
1788
+ }>>;
1789
+ description: z.ZodOptional<z.ZodString>;
1790
+ }, z.core.$strip>>>;
1791
+ indexes: z.ZodDefault<z.ZodArray<z.ZodObject<{
1792
+ columns: z.ZodArray<z.ZodString>;
1793
+ unique: z.ZodDefault<z.ZodBoolean>;
1794
+ name: z.ZodOptional<z.ZodString>;
1795
+ }, z.core.$strip>>>;
1796
+ checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1797
+ name: z.ZodString;
1798
+ expression: z.ZodString;
1799
+ }, z.core.$strict>>>;
1800
+ policies: z.ZodDefault<z.ZodObject<{
1801
+ read: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1802
+ default: z.ZodString;
1803
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1804
+ when: z.ZodString;
1805
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1806
+ policy: z.ZodOptional<z.ZodString>;
1807
+ }, z.core.$strip>>>;
1808
+ }, z.core.$strip>]>>;
1809
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1810
+ default: z.ZodString;
1811
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1812
+ when: z.ZodString;
1813
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1814
+ policy: z.ZodOptional<z.ZodString>;
1815
+ }, z.core.$strip>>>;
1816
+ }, z.core.$strip>]>>;
1817
+ insert: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1818
+ default: z.ZodString;
1819
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1820
+ when: z.ZodString;
1821
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1822
+ policy: z.ZodOptional<z.ZodString>;
1823
+ }, z.core.$strip>>>;
1824
+ }, z.core.$strip>]>>;
1825
+ update: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1826
+ default: z.ZodString;
1827
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1828
+ when: z.ZodString;
1829
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1830
+ policy: z.ZodOptional<z.ZodString>;
1831
+ }, z.core.$strip>>>;
1832
+ }, z.core.$strip>]>>;
1833
+ }, z.core.$strip>>;
1834
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1835
+ name: z.ZodString;
1836
+ requires: z.ZodOptional<z.ZodString>;
1837
+ params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1838
+ type: z.ZodEnum<{
1839
+ bigint: "bigint";
1840
+ boolean: "boolean";
1841
+ date: "date";
1842
+ text: "text";
1843
+ timestamptz: "timestamptz";
1844
+ jsonb: "jsonb";
1845
+ uuid: "uuid";
1846
+ integer: "integer";
1847
+ numeric: "numeric";
1848
+ double: "double";
1849
+ }>;
1850
+ nullable: z.ZodDefault<z.ZodBoolean>;
1851
+ }, z.core.$strip>>>;
1852
+ executes: z.ZodString;
1853
+ returns: z.ZodDefault<z.ZodEnum<{
1854
+ rows: "rows";
1855
+ rowsAffected: "rowsAffected";
1856
+ scalar: "scalar";
1857
+ }>>;
1858
+ audit: z.ZodOptional<z.ZodObject<{
1859
+ action: z.ZodString;
1860
+ resource: z.ZodString;
1861
+ }, z.core.$strip>>;
1862
+ }, z.core.$strip>>>;
1863
+ cowMutations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1864
+ kind: z.ZodEnum<{
1865
+ override: "override";
1866
+ revert: "revert";
1867
+ }>;
1868
+ name: z.ZodString;
1869
+ synced: z.ZodString;
1870
+ pk: z.ZodString;
1871
+ copy: z.ZodDefault<z.ZodArray<z.ZodString>>;
1872
+ set: z.ZodDefault<z.ZodArray<z.ZodString>>;
1873
+ }, z.core.$strip>>>;
1874
+ foreignKeys: z.ZodOptional<z.ZodArray<z.ZodObject<{
1875
+ name: z.ZodString;
1876
+ columns: z.ZodArray<z.ZodString>;
1877
+ target: z.ZodString;
1878
+ references: z.ZodArray<z.ZodString>;
1879
+ deferrable: z.ZodOptional<z.ZodEnum<{
1880
+ "initially-immediate": "initially-immediate";
1881
+ "initially-deferred": "initially-deferred";
1882
+ }>>;
1883
+ onDelete: z.ZodOptional<z.ZodEnum<{
1884
+ cascade: "cascade";
1885
+ restrict: "restrict";
1886
+ "no action": "no action";
1887
+ "set null": "set null";
1888
+ "set default": "set default";
1889
+ }>>;
1890
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1891
+ cascade: "cascade";
1892
+ restrict: "restrict";
1893
+ "no action": "no action";
1894
+ "set null": "set null";
1895
+ "set default": "set default";
1896
+ }>>;
1897
+ }, z.core.$strict>>>;
1898
+ cellMetadata: z.ZodOptional<z.ZodLiteral<true>>;
1899
+ internal: z.ZodOptional<z.ZodLiteral<true>>;
1900
+ materializes: z.ZodOptional<z.ZodString>;
1901
+ }, z.core.$strip>>;
1902
+ views: z.ZodOptional<z.ZodArray<z.ZodObject<{
1903
+ view: z.ZodString;
1904
+ description: z.ZodOptional<z.ZodString>;
1905
+ columns: z.ZodArray<z.ZodObject<{
1906
+ name: z.ZodString;
1907
+ columnName: z.ZodString;
1908
+ type: z.ZodUnion<readonly [z.ZodEnum<{
1909
+ bigint: "bigint";
1910
+ boolean: "boolean";
1911
+ date: "date";
1912
+ text: "text";
1913
+ timestamptz: "timestamptz";
1914
+ jsonb: "jsonb";
1915
+ uuid: "uuid";
1916
+ integer: "integer";
1917
+ numeric: "numeric";
1918
+ double: "double";
1919
+ }>, z.ZodObject<{
1920
+ enum: z.ZodString;
1921
+ }, z.core.$strip>]>;
1922
+ nullable: z.ZodDefault<z.ZodBoolean>;
1923
+ unique: z.ZodDefault<z.ZodBoolean>;
1924
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
1925
+ defaultFn: z.ZodOptional<z.ZodEnum<{
1926
+ "gen_random_uuid()": "gen_random_uuid()";
1927
+ "now()": "now()";
1928
+ }>>;
1929
+ onUpdateFn: z.ZodOptional<z.ZodEnum<{
1930
+ "now()": "now()";
1931
+ }>>;
1932
+ description: z.ZodOptional<z.ZodString>;
1933
+ renamedFrom: z.ZodOptional<z.ZodString>;
1934
+ cast: z.ZodOptional<z.ZodString>;
1935
+ deprecated: z.ZodDefault<z.ZodBoolean>;
1936
+ cell: z.ZodOptional<z.ZodObject<{
1937
+ of: z.ZodString;
1938
+ part: z.ZodEnum<{
1939
+ at: "at";
1940
+ by: "by";
1941
+ rev: "rev";
1942
+ source: "source";
1943
+ conflicts: "conflicts";
1944
+ }>;
1945
+ }, z.core.$strict>>;
1946
+ }, z.core.$strip>>;
1947
+ primaryKey: z.ZodOptional<z.ZodArray<z.ZodString>>;
1948
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1949
+ name: z.ZodString;
1950
+ kind: z.ZodEnum<{
1951
+ toOne: "toOne";
1952
+ toMany: "toMany";
1953
+ toPlatformUser: "toPlatformUser";
1954
+ }>;
1955
+ target: z.ZodOptional<z.ZodString>;
1956
+ namespace: z.ZodOptional<z.ZodString>;
1957
+ on: z.ZodString;
1958
+ references: z.ZodOptional<z.ZodString>;
1959
+ enforce: z.ZodDefault<z.ZodBoolean>;
1960
+ onDelete: z.ZodOptional<z.ZodEnum<{
1961
+ cascade: "cascade";
1962
+ restrict: "restrict";
1963
+ "no action": "no action";
1964
+ "set null": "set null";
1965
+ "set default": "set default";
1966
+ }>>;
1967
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1968
+ cascade: "cascade";
1969
+ restrict: "restrict";
1970
+ "no action": "no action";
1971
+ "set null": "set null";
1972
+ "set default": "set default";
1973
+ }>>;
1974
+ description: z.ZodOptional<z.ZodString>;
1975
+ }, z.core.$strip>>>;
1976
+ policies: z.ZodObject<{
1977
+ read: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1978
+ default: z.ZodString;
1979
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
1980
+ when: z.ZodString;
1981
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
1982
+ policy: z.ZodOptional<z.ZodString>;
1983
+ }, z.core.$strip>>>;
1984
+ }, z.core.$strip>]>;
1985
+ }, z.core.$strict>;
1986
+ query: z.ZodString;
1987
+ dependencies: z.ZodArray<z.ZodString>;
1988
+ resolved: z.ZodOptional<z.ZodObject<{
1989
+ sources: z.ZodArray<z.ZodObject<{
1990
+ name: z.ZodString;
1991
+ kind: z.ZodEnum<{
1992
+ manual: "manual";
1993
+ prefetch: "prefetch";
1994
+ etl: "etl";
1995
+ }>;
1996
+ table: z.ZodString;
1997
+ columns: z.ZodArray<z.ZodString>;
1998
+ updatedAt: z.ZodOptional<z.ZodString>;
1999
+ key: z.ZodOptional<z.ZodString>;
2000
+ fetch: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2001
+ shape: z.ZodLiteral<"single">;
2002
+ }, z.core.$strict>, z.ZodObject<{
2003
+ shape: z.ZodLiteral<"batch">;
2004
+ maxKeys: z.ZodNumber;
2005
+ }, z.core.$strict>]>>;
2006
+ function: z.ZodOptional<z.ZodObject<{
2007
+ kind: z.ZodEnum<{
2008
+ managed: "managed";
2009
+ native: "native";
2010
+ }>;
2011
+ id: z.ZodString;
2012
+ }, z.core.$strict>>;
2013
+ prefetchDefaults: z.ZodOptional<z.ZodObject<{
2014
+ maxStalenessMs: z.ZodNumber;
2015
+ timeoutMs: z.ZodNumber;
2016
+ onError: z.ZodEnum<{
2017
+ fallback: "fallback";
2018
+ fail: "fail";
2019
+ }>;
2020
+ }, z.core.$strict>>;
2021
+ writeback: z.ZodOptional<z.ZodObject<{
2022
+ columns: z.ZodArray<z.ZodString>;
2023
+ defaultMode: z.ZodEnum<{
2024
+ sync: "sync";
2025
+ async: "async";
2026
+ }>;
2027
+ timeoutMs: z.ZodNumber;
2028
+ clearManualOnConfirm: z.ZodBoolean;
2029
+ }, z.core.$strict>>;
2030
+ }, z.core.$strict>>;
2031
+ resolve: z.ZodArray<z.ZodObject<{
2032
+ column: z.ZodString;
2033
+ comparator: z.ZodEnum<{
2034
+ custom: "custom";
2035
+ latest: "latest";
2036
+ highest: "highest";
2037
+ lowest: "lowest";
2038
+ priority: "priority";
2039
+ nonNullFirst: "nonNullFirst";
2040
+ }>;
2041
+ candidates: z.ZodArray<z.ZodString>;
2042
+ orderBy: z.ZodOptional<z.ZodString>;
2043
+ }, z.core.$strict>>;
2044
+ deletedBy: z.ZodDefault<z.ZodArray<z.ZodString>>;
2045
+ materialized: z.ZodOptional<z.ZodObject<{
2046
+ table: z.ZodString;
2047
+ compute: z.ZodString;
2048
+ }, z.core.$strict>>;
2049
+ policies: z.ZodDefault<z.ZodObject<{
2050
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2051
+ default: z.ZodString;
2052
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
2053
+ when: z.ZodString;
2054
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
2055
+ policy: z.ZodOptional<z.ZodString>;
2056
+ }, z.core.$strip>>>;
2057
+ }, z.core.$strip>]>>;
2058
+ insert: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2059
+ default: z.ZodString;
2060
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
2061
+ when: z.ZodString;
2062
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
2063
+ policy: z.ZodOptional<z.ZodString>;
2064
+ }, z.core.$strip>>>;
2065
+ }, z.core.$strip>]>>;
2066
+ update: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2067
+ default: z.ZodString;
2068
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
2069
+ when: z.ZodString;
2070
+ allow: z.ZodOptional<z.ZodLiteral<true>>;
2071
+ policy: z.ZodOptional<z.ZodString>;
2072
+ }, z.core.$strip>>>;
2073
+ }, z.core.$strip>]>>;
2074
+ }, z.core.$strict>>;
2075
+ }, z.core.$strict>>;
2076
+ internal: z.ZodOptional<z.ZodLiteral<true>>;
2077
+ }, z.core.$strip>>>;
2078
+ exports: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2079
+ read: z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
2080
+ capability: z.ZodString;
2081
+ }, z.core.$strict>, z.ZodObject<{
2082
+ role: z.ZodString;
2083
+ }, z.core.$strict>]>;
2084
+ write: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
2085
+ capability: z.ZodString;
2086
+ }, z.core.$strict>, z.ZodObject<{
2087
+ role: z.ZodString;
2088
+ }, z.core.$strict>]>>;
2089
+ }, z.core.$strict>>>;
2090
+ capabilities: z.ZodDefault<z.ZodObject<{
2091
+ roles: z.ZodOptional<z.ZodUnknown>;
2092
+ uses: z.ZodDefault<z.ZodArray<z.ZodString>>;
2093
+ }, z.core.$strip>>;
2094
+ }, z.core.$strip>>>;
2095
+ }, z.core.$strip>;
1270
2096
  type CanonicalDefinition = z.infer<typeof canonicalDefinitionSchema>;
1271
2097
  /**
1272
2098
  * Project namespace-local tables and views onto the shared read/query surface.
@@ -1289,4 +2115,4 @@ declare function canonicalRelations(definition: CanonicalDefinition): CanonicalR
1289
2115
  */
1290
2116
  declare function normalizeCanonical(definition: CanonicalDefinition): CanonicalDefinition;
1291
2117
 
1292
- export { CANONICAL_FORMAT, CELL_PART_TYPES, COLUMN_TYPES, COMPARATORS, type CanonicalCheck, type CanonicalColumn, type CanonicalCowMutation, type CanonicalDefinition, type CanonicalEnum, type CanonicalFetchShape, type CanonicalForeignKey, type CanonicalFunctionRef, type CanonicalLink, type CanonicalRelation, type CanonicalResolveRule, type CanonicalResolved, type CanonicalResolvedSource, type CanonicalTable, type CanonicalView, type ColumnType, type ComparatorKind, IDENTIFIER_RE, RESERVED_RESOLVED_COLUMN_NAMES, RESOLVED_SOURCE_CELL_PARTS, RESOLVED_SOURCE_SYSTEM_COLUMNS, RESOLVED_VIEW_CELL_PARTS, RESOLVED_VIEW_SYSTEM_COLUMNS, VIEW_QUERY_FUNCTION_ALLOWLIST, canonicalActionSchema, canonicalCheckSchema, canonicalColumnSchema, canonicalCowMutationSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalFetchShapeSchema, canonicalForeignKeySchema, canonicalFunctionRefSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalResolveRuleSchema, canonicalResolvedSchema, canonicalResolvedSourceSchema, canonicalTableSchema, canonicalViewSchema, isSingleViewQuerySql, normalizeCanonical, parseDurationMs, trackedCellColumns, validateResolvedView };
2118
+ export { CANONICAL_FORMAT, CELL_PART_TYPES, COLUMN_TYPES, COMPARATORS, type CanonicalCheck, type CanonicalColumn, type CanonicalCowMutation, type CanonicalDefinition, type CanonicalEnum, type CanonicalFetchShape, type CanonicalForeignKey, type CanonicalFunctionRef, type CanonicalLink, type CanonicalRelation, type CanonicalResolveRule, type CanonicalResolved, type CanonicalResolvedSource, type CanonicalTable, type CanonicalView, type ColumnType, type ComparatorKind, IDENTIFIER_RE, type OntologyContract, RESERVED_RESOLVED_COLUMN_NAMES, RESOLVED_SOURCE_CELL_PARTS, RESOLVED_SOURCE_SYSTEM_COLUMNS, RESOLVED_VIEW_CELL_PARTS, RESOLVED_VIEW_SYSTEM_COLUMNS, VIEW_QUERY_FUNCTION_ALLOWLIST, canonicalActionSchema, canonicalCheckSchema, canonicalColumnSchema, canonicalCowMutationSchema, canonicalDefinitionSchema, canonicalEnumSchema, canonicalFetchShapeSchema, canonicalForeignKeySchema, canonicalFunctionRefSchema, canonicalIndexSchema, canonicalLinkSchema, canonicalPoliciesSchema, canonicalRelations, canonicalResolveRuleSchema, canonicalResolvedSchema, canonicalResolvedSourceSchema, canonicalTableSchema, canonicalViewSchema, exportGateSchema, isSingleViewQuerySql, localDefinitionSchema, normalizeCanonical, ontologyContractSchema, parseDurationMs, readOntologyContract, relationExportSchema, trackedCellColumns, validateResolvedView };