@ai-matrx/records 0.4.1 → 0.6.2

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.
package/dist/index.d.ts CHANGED
@@ -208,7 +208,7 @@ declare const STORE_DOORS: readonly [{
208
208
  readonly name: "agg_explain";
209
209
  readonly args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text";
210
210
  readonly returns: "jsonb";
211
- readonly security: "invoker";
211
+ readonly security: "definer";
212
212
  }, {
213
213
  readonly name: "agg_operations";
214
214
  readonly args: "";
@@ -299,11 +299,26 @@ declare const STORE_DOORS: readonly [{
299
299
  readonly args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'editor'::permission_level, p_subject_word text DEFAULT 'record'::text";
300
300
  readonly returns: "void";
301
301
  readonly security: "invoker";
302
+ }, {
303
+ readonly name: "assert_client_may_open";
304
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'viewer'::permission_level, p_subject_word text DEFAULT 'record'::text";
305
+ readonly returns: "void";
306
+ readonly security: "invoker";
302
307
  }, {
303
308
  readonly name: "assert_client_may_reach";
304
309
  readonly args: "p_organization_id uuid, p_door text";
305
310
  readonly returns: "void";
306
311
  readonly security: "invoker";
312
+ }, {
313
+ readonly name: "assert_may_know_table";
314
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_door text";
315
+ readonly returns: "void";
316
+ readonly security: "invoker";
317
+ }, {
318
+ readonly name: "assert_organization_admin";
319
+ readonly args: "p_organization_id uuid, p_door text, p_what text";
320
+ readonly returns: "void";
321
+ readonly security: "invoker";
307
322
  }, {
308
323
  readonly name: "assert_organization_wall";
309
324
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
@@ -359,11 +374,26 @@ declare const STORE_DOORS: readonly [{
359
374
  readonly args: "p_data jsonb";
360
375
  readonly returns: "uuid";
361
376
  readonly security: "invoker";
377
+ }, {
378
+ readonly name: "cross_organization_links_open";
379
+ readonly args: "p_source_organization_id uuid, p_target_organization_id uuid";
380
+ readonly returns: "boolean";
381
+ readonly security: "invoker";
362
382
  }, {
363
383
  readonly name: "custom_fields_tables";
364
384
  readonly args: "";
365
385
  readonly returns: "TABLE(token text, schema_name text, table_name text)";
366
386
  readonly security: "invoker";
387
+ }, {
388
+ readonly name: "delete_cascade_closure";
389
+ readonly args: "p_organization_id uuid, p_record_id uuid";
390
+ readonly returns: "uuid[]";
391
+ readonly security: "invoker";
392
+ }, {
393
+ readonly name: "delete_rule";
394
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true";
395
+ readonly returns: "jsonb";
396
+ readonly security: "definer";
367
397
  }, {
368
398
  readonly name: "dependency_cycle";
369
399
  readonly args: "p_organization_id uuid, p_row custom.record";
@@ -464,6 +494,16 @@ declare const STORE_DOORS: readonly [{
464
494
  readonly args: "";
465
495
  readonly returns: "TABLE(function_name text, identity_args text, why text)";
466
496
  readonly security: "invoker";
497
+ }, {
498
+ readonly name: "doors_not_on_one_ladder";
499
+ readonly args: "";
500
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
501
+ readonly security: "invoker";
502
+ }, {
503
+ readonly name: "effective_level";
504
+ readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
505
+ readonly returns: "permission_level";
506
+ readonly security: "definer";
467
507
  }, {
468
508
  readonly name: "export_records";
469
509
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
@@ -509,6 +549,16 @@ declare const STORE_DOORS: readonly [{
509
549
  readonly args: "p_organization_id uuid, p_source_id uuid, p_enabled boolean";
510
550
  readonly returns: "boolean";
511
551
  readonly security: "definer";
552
+ }, {
553
+ readonly name: "field_behaviour";
554
+ readonly args: "p_field_data jsonb";
555
+ readonly returns: "text";
556
+ readonly security: "invoker";
557
+ }, {
558
+ readonly name: "field_declare";
559
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb";
560
+ readonly returns: "uuid";
561
+ readonly security: "definer";
512
562
  }, {
513
563
  readonly name: "field_dependants";
514
564
  readonly args: "p_organization_id uuid, p_field_id uuid";
@@ -523,12 +573,27 @@ declare const STORE_DOORS: readonly [{
523
573
  readonly name: "field_options";
524
574
  readonly args: "p_organization_id uuid, p_field_id uuid";
525
575
  readonly returns: "SETOF custom.record";
526
- readonly security: "invoker";
576
+ readonly security: "definer";
577
+ }, {
578
+ readonly name: "field_retire";
579
+ readonly args: "p_organization_id uuid, p_field_id uuid";
580
+ readonly returns: "boolean";
581
+ readonly security: "definer";
527
582
  }, {
528
583
  readonly name: "field_rules";
529
584
  readonly args: "p_field_data jsonb";
530
585
  readonly returns: "TABLE(kind text, spec jsonb)";
531
586
  readonly security: "invoker";
587
+ }, {
588
+ readonly name: "field_update";
589
+ readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb";
590
+ readonly returns: "uuid";
591
+ readonly security: "definer";
592
+ }, {
593
+ readonly name: "field_value_convert";
594
+ readonly args: "p_to jsonb, p_value jsonb";
595
+ readonly returns: "jsonb";
596
+ readonly security: "invoker";
532
597
  }, {
533
598
  readonly name: "file_kernel_id";
534
599
  readonly args: "";
@@ -554,11 +619,31 @@ declare const STORE_DOORS: readonly [{
554
619
  readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text";
555
620
  readonly returns: "jsonb";
556
621
  readonly security: "invoker";
622
+ }, {
623
+ readonly name: "history_prune";
624
+ readonly args: "p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
625
+ readonly returns: "jsonb";
626
+ readonly security: "definer";
627
+ }, {
628
+ readonly name: "history_retention";
629
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
630
+ readonly returns: "jsonb";
631
+ readonly security: "definer";
632
+ }, {
633
+ readonly name: "history_retention_floor_raise";
634
+ readonly args: "p_organization_id uuid, p_days integer";
635
+ readonly returns: "integer";
636
+ readonly security: "definer";
637
+ }, {
638
+ readonly name: "history_retention_set";
639
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_days integer";
640
+ readonly returns: "integer";
641
+ readonly security: "definer";
557
642
  }, {
558
643
  readonly name: "home_add";
559
644
  readonly args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid";
560
645
  readonly returns: "uuid";
561
- readonly security: "invoker";
646
+ readonly security: "definer";
562
647
  }, {
563
648
  readonly name: "home_relations";
564
649
  readonly args: "";
@@ -616,7 +701,7 @@ declare const STORE_DOORS: readonly [{
616
701
  readonly security: "definer";
617
702
  }, {
618
703
  readonly name: "io_export_csv";
619
- readonly args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT ','::text, p_required text DEFAULT 'viewer'::text";
704
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text";
620
705
  readonly returns: "text";
621
706
  readonly security: "definer";
622
707
  }, {
@@ -672,7 +757,7 @@ declare const STORE_DOORS: readonly [{
672
757
  }, {
673
758
  readonly name: "io_revisions";
674
759
  readonly args: "p_organization_id uuid, p_record_id uuid";
675
- readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text)";
760
+ readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)";
676
761
  readonly security: "definer";
677
762
  }, {
678
763
  readonly name: "lookup_value";
@@ -698,42 +783,42 @@ declare const STORE_DOORS: readonly [{
698
783
  readonly name: "migrate_delete";
699
784
  readonly args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text";
700
785
  readonly returns: "jsonb";
701
- readonly security: "invoker";
786
+ readonly security: "definer";
702
787
  }, {
703
788
  readonly name: "migrate_demote";
704
789
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
705
790
  readonly returns: "jsonb";
706
- readonly security: "invoker";
791
+ readonly security: "definer";
707
792
  }, {
708
793
  readonly name: "migrate_extract_parent";
709
794
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
710
795
  readonly returns: "jsonb";
711
- readonly security: "invoker";
796
+ readonly security: "definer";
712
797
  }, {
713
798
  readonly name: "migrate_merge";
714
799
  readonly args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text";
715
800
  readonly returns: "jsonb";
716
- readonly security: "invoker";
801
+ readonly security: "definer";
717
802
  }, {
718
803
  readonly name: "migrate_promote";
719
804
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
720
805
  readonly returns: "jsonb";
721
- readonly security: "invoker";
806
+ readonly security: "definer";
722
807
  }, {
723
808
  readonly name: "migrate_purge";
724
809
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
725
810
  readonly returns: "jsonb";
726
- readonly security: "invoker";
811
+ readonly security: "definer";
727
812
  }, {
728
813
  readonly name: "migrate_rename";
729
814
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
730
815
  readonly returns: "jsonb";
731
- readonly security: "invoker";
816
+ readonly security: "definer";
732
817
  }, {
733
818
  readonly name: "migrate_reparent";
734
819
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text";
735
820
  readonly returns: "jsonb";
736
- readonly security: "invoker";
821
+ readonly security: "definer";
737
822
  }, {
738
823
  readonly name: "migrate_retype";
739
824
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
@@ -743,7 +828,12 @@ declare const STORE_DOORS: readonly [{
743
828
  readonly name: "migrate_split";
744
829
  readonly args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
745
830
  readonly returns: "jsonb";
746
- readonly security: "invoker";
831
+ readonly security: "definer";
832
+ }, {
833
+ readonly name: "migrate_undo";
834
+ readonly args: "p_organization_id uuid, p_log_id uuid";
835
+ readonly returns: "jsonb";
836
+ readonly security: "definer";
747
837
  }, {
748
838
  readonly name: "organization_kernel_id";
749
839
  readonly args: "";
@@ -754,6 +844,16 @@ declare const STORE_DOORS: readonly [{
754
844
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
755
845
  readonly returns: "TABLE(site text, what text, ref_id uuid, openable boolean)";
756
846
  readonly security: "invoker";
847
+ }, {
848
+ readonly name: "owning_table";
849
+ readonly args: "p_organization_id uuid, p_record_id uuid";
850
+ readonly returns: "uuid";
851
+ readonly security: "invoker";
852
+ }, {
853
+ readonly name: "owning_table_gone";
854
+ readonly args: "p_organization_id uuid, p_record_id uuid";
855
+ readonly returns: "boolean";
856
+ readonly security: "invoker";
757
857
  }, {
758
858
  readonly name: "parity_field_types";
759
859
  readonly args: "";
@@ -853,17 +953,17 @@ declare const STORE_DOORS: readonly [{
853
953
  readonly name: "query_across_homes";
854
954
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
855
955
  readonly returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)";
856
- readonly security: "invoker";
956
+ readonly security: "definer";
857
957
  }, {
858
958
  readonly name: "query_by_coordinates";
859
959
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
860
960
  readonly returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)";
861
- readonly security: "invoker";
961
+ readonly security: "definer";
862
962
  }, {
863
963
  readonly name: "query_can_see";
864
964
  readonly args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text";
865
965
  readonly returns: "boolean";
866
- readonly security: "invoker";
966
+ readonly security: "definer";
867
967
  }, {
868
968
  readonly name: "query_hot_paths";
869
969
  readonly args: "";
@@ -893,37 +993,42 @@ declare const STORE_DOORS: readonly [{
893
993
  readonly name: "query_record_as_of";
894
994
  readonly args: "p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text";
895
995
  readonly returns: "jsonb";
896
- readonly security: "invoker";
996
+ readonly security: "definer";
897
997
  }, {
898
998
  readonly name: "query_relation_edges";
899
999
  readonly args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text";
900
1000
  readonly returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)";
901
- readonly security: "invoker";
1001
+ readonly security: "definer";
902
1002
  }, {
903
1003
  readonly name: "query_rollup";
904
1004
  readonly args: "p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text";
905
1005
  readonly returns: "TABLE(record_id uuid, depth integer)";
906
- readonly security: "invoker";
1006
+ readonly security: "definer";
907
1007
  }, {
908
1008
  readonly name: "query_rollup_sum";
909
1009
  readonly args: "p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text";
910
1010
  readonly returns: "numeric";
911
- readonly security: "invoker";
1011
+ readonly security: "definer";
912
1012
  }, {
913
1013
  readonly name: "query_table_as_of";
914
1014
  readonly args: "p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text";
915
1015
  readonly returns: "TABLE(record_id uuid, data jsonb)";
916
- readonly security: "invoker";
1016
+ readonly security: "definer";
917
1017
  }, {
918
1018
  readonly name: "query_table_homes";
919
1019
  readonly args: "p_organization_id uuid, p_table_id uuid";
920
1020
  readonly returns: "SETOF uuid";
921
- readonly security: "invoker";
1021
+ readonly security: "definer";
1022
+ }, {
1023
+ readonly name: "query_visibility_parity";
1024
+ readonly args: "p_organization_id uuid";
1025
+ readonly returns: "TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)";
1026
+ readonly security: "definer";
922
1027
  }, {
923
1028
  readonly name: "query_visible_ids";
924
1029
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text";
925
1030
  readonly returns: "SETOF uuid";
926
- readonly security: "invoker";
1031
+ readonly security: "definer";
927
1032
  }, {
928
1033
  readonly name: "reachable_from";
929
1034
  readonly args: "p_organization_id uuid, p_roots uuid[]";
@@ -948,27 +1053,52 @@ declare const STORE_DOORS: readonly [{
948
1053
  readonly name: "record_aggregate";
949
1054
  readonly args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text";
950
1055
  readonly returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)";
951
- readonly security: "invoker";
1056
+ readonly security: "definer";
952
1057
  }, {
953
1058
  readonly name: "record_applicability";
954
1059
  readonly args: "p_organization_id uuid, p_record_id uuid";
955
1060
  readonly returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)";
956
1061
  readonly security: "invoker";
1062
+ }, {
1063
+ readonly name: "record_card";
1064
+ readonly args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid";
1065
+ readonly returns: "jsonb";
1066
+ readonly security: "definer";
1067
+ }, {
1068
+ readonly name: "record_carrying_edges";
1069
+ readonly args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone";
1070
+ readonly returns: "TABLE(container_id uuid, item_id uuid, edge_role text)";
1071
+ readonly security: "invoker";
957
1072
  }, {
958
1073
  readonly name: "record_delete";
959
1074
  readonly args: "p_organization_id uuid, p_record_id uuid";
960
1075
  readonly returns: "timestamp with time zone";
961
1076
  readonly security: "definer";
1077
+ }, {
1078
+ readonly name: "record_relation_edges";
1079
+ readonly args: "p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone";
1080
+ readonly returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)";
1081
+ readonly security: "invoker";
962
1082
  }, {
963
1083
  readonly name: "record_reparent";
964
1084
  readonly args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid";
965
1085
  readonly returns: "void";
966
- readonly security: "invoker";
1086
+ readonly security: "definer";
1087
+ }, {
1088
+ readonly name: "record_resolve";
1089
+ readonly args: "p_organization_id uuid, p_id uuid";
1090
+ readonly returns: "jsonb";
1091
+ readonly security: "definer";
967
1092
  }, {
968
1093
  readonly name: "record_restore";
969
1094
  readonly args: "p_organization_id uuid, p_record_id uuid";
970
1095
  readonly returns: "void";
971
1096
  readonly security: "definer";
1097
+ }, {
1098
+ readonly name: "record_state_as_of";
1099
+ readonly args: "p_record_id uuid, p_at timestamp with time zone";
1100
+ readonly returns: "TABLE(state jsonb, replayed boolean)";
1101
+ readonly security: "definer";
972
1102
  }, {
973
1103
  readonly name: "record_update";
974
1104
  readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer";
@@ -983,17 +1113,27 @@ declare const STORE_DOORS: readonly [{
983
1113
  readonly name: "record_values_versioned";
984
1114
  readonly args: "p_organization_id uuid, p_record_id uuid";
985
1115
  readonly returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)";
986
- readonly security: "invoker";
1116
+ readonly security: "definer";
987
1117
  }, {
988
1118
  readonly name: "record_write";
989
1119
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
990
1120
  readonly returns: "uuid";
991
1121
  readonly security: "definer";
1122
+ }, {
1123
+ readonly name: "relation_carry";
1124
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1125
+ readonly returns: "uuid";
1126
+ readonly security: "definer";
992
1127
  }, {
993
1128
  readonly name: "relation_own";
994
1129
  readonly args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid";
995
1130
  readonly returns: "uuid";
996
- readonly security: "invoker";
1131
+ readonly security: "definer";
1132
+ }, {
1133
+ readonly name: "relation_target_card";
1134
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text";
1135
+ readonly returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)";
1136
+ readonly security: "definer";
997
1137
  }, {
998
1138
  readonly name: "relation_target_external";
999
1139
  readonly args: "p_connection_token text, p_external_table text, p_external_key text";
@@ -1008,7 +1148,12 @@ declare const STORE_DOORS: readonly [{
1008
1148
  readonly name: "relation_targets";
1009
1149
  readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text";
1010
1150
  readonly returns: "SETOF uuid";
1011
- readonly security: "invoker";
1151
+ readonly security: "definer";
1152
+ }, {
1153
+ readonly name: "relation_uncarry";
1154
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1155
+ readonly returns: "integer";
1156
+ readonly security: "definer";
1012
1157
  }, {
1013
1158
  readonly name: "reopen_declared_doors";
1014
1159
  readonly args: "";
@@ -1109,6 +1254,46 @@ declare const STORE_DOORS: readonly [{
1109
1254
  readonly args: "p_organization_id uuid, p_rule_id uuid";
1110
1255
  readonly returns: "integer";
1111
1256
  readonly security: "invoker";
1257
+ }, {
1258
+ readonly name: "share_access";
1259
+ readonly args: "p_organization_id uuid, p_subject_id uuid";
1260
+ readonly returns: "TABLE(principal_kind text, principal_id uuid, principal_label text, level permission_level, reason text, reason_detail text, via_type text, via_id uuid, revocable boolean)";
1261
+ readonly security: "definer";
1262
+ }, {
1263
+ readonly name: "share_grant";
1264
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid, p_level permission_level DEFAULT 'viewer'::permission_level";
1265
+ readonly returns: "jsonb";
1266
+ readonly security: "definer";
1267
+ }, {
1268
+ readonly name: "share_lane_set";
1269
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level";
1270
+ readonly returns: "jsonb";
1271
+ readonly security: "definer";
1272
+ }, {
1273
+ readonly name: "share_lanes";
1274
+ readonly args: "";
1275
+ readonly returns: "TABLE(choice text, lane text, discoverable boolean, label text, means text)";
1276
+ readonly security: "definer";
1277
+ }, {
1278
+ readonly name: "share_levels";
1279
+ readonly args: "";
1280
+ readonly returns: "TABLE(level permission_level, ordinal integer, label text, means text)";
1281
+ readonly security: "definer";
1282
+ }, {
1283
+ readonly name: "share_people";
1284
+ readonly args: "p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25";
1285
+ readonly returns: "TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)";
1286
+ readonly security: "definer";
1287
+ }, {
1288
+ readonly name: "share_revoke";
1289
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid";
1290
+ readonly returns: "jsonb";
1291
+ readonly security: "definer";
1292
+ }, {
1293
+ readonly name: "share_subject_name";
1294
+ readonly args: "p_organization_id uuid, p_type text, p_id uuid";
1295
+ readonly returns: "text";
1296
+ readonly security: "definer";
1112
1297
  }, {
1113
1298
  readonly name: "size_refusal";
1114
1299
  readonly args: "p_organization_id uuid, p_data jsonb";
@@ -1144,11 +1329,21 @@ declare const STORE_DOORS: readonly [{
1144
1329
  readonly args: "p_organization_id uuid, p_table_id uuid";
1145
1330
  readonly returns: "jsonb";
1146
1331
  readonly security: "definer";
1332
+ }, {
1333
+ readonly name: "table_contents";
1334
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1335
+ readonly returns: "TABLE(record_id uuid, kind text, goes_at integer)";
1336
+ readonly security: "invoker";
1147
1337
  }, {
1148
1338
  readonly name: "table_declare";
1149
1339
  readonly args: "p_organization_id uuid, p_spec jsonb";
1150
1340
  readonly returns: "uuid";
1151
1341
  readonly security: "definer";
1342
+ }, {
1343
+ readonly name: "table_is_live";
1344
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1345
+ readonly returns: "boolean";
1346
+ readonly security: "invoker";
1152
1347
  }, {
1153
1348
  readonly name: "table_kernel_id";
1154
1349
  readonly args: "";
@@ -1183,6 +1378,11 @@ declare const STORE_DOORS: readonly [{
1183
1378
  readonly name: "tables_at_home";
1184
1379
  readonly args: "p_organization_id uuid, p_home_ids uuid[]";
1185
1380
  readonly returns: "TABLE(table_id uuid, home_record_id uuid, kind text)";
1381
+ readonly security: "definer";
1382
+ }, {
1383
+ readonly name: "tables_described_without_asking";
1384
+ readonly args: "";
1385
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
1186
1386
  readonly security: "invoker";
1187
1387
  }, {
1188
1388
  readonly name: "trg_associations_bump_visibility";
@@ -1239,6 +1439,11 @@ declare const STORE_DOORS: readonly [{
1239
1439
  readonly args: "p_item_type text, p_item_id uuid";
1240
1440
  readonly returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)";
1241
1441
  readonly security: "definer";
1442
+ }, {
1443
+ readonly name: "visibility_as_of";
1444
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone";
1445
+ readonly returns: "TABLE(principal_kind text, principal_id uuid, level permission_level, through_kind text, through_id uuid, reason text, replayed boolean, held_from timestamp with time zone, held_to timestamp with time zone)";
1446
+ readonly security: "definer";
1242
1447
  }, {
1243
1448
  readonly name: "visibility_cache_rebuild";
1244
1449
  readonly args: "";
@@ -1408,6 +1613,10 @@ declare const STORE_KNOBS: readonly [{
1408
1613
  readonly key: "containment_depth_ceiling";
1409
1614
  readonly value: "16";
1410
1615
  readonly type: "integer";
1616
+ }, {
1617
+ readonly key: "cross_organization_links";
1618
+ readonly value: "false";
1619
+ readonly type: "boolean";
1411
1620
  }, {
1412
1621
  readonly key: "document_max_bytes";
1413
1622
  readonly value: "1048576";
@@ -1444,6 +1653,14 @@ declare const STORE_KNOBS: readonly [{
1444
1653
  readonly key: "member_default_level";
1445
1654
  readonly value: "\"viewer\"";
1446
1655
  readonly type: "string";
1656
+ }, {
1657
+ readonly key: "member_default_visibility";
1658
+ readonly value: "\"all_records\"";
1659
+ readonly type: "enum";
1660
+ }, {
1661
+ readonly key: "records_tool_default";
1662
+ readonly value: "true";
1663
+ readonly type: "boolean";
1447
1664
  }, {
1448
1665
  readonly key: "row_versions_guard";
1449
1666
  readonly value: "false";
@@ -1493,43 +1710,46 @@ declare const STORE_KNOBS: readonly [{
1493
1710
  */
1494
1711
  declare const STORE_REFUSAL_CODES: readonly [{
1495
1712
  readonly code: "02000";
1496
- readonly raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,read_record,record_delete,record_restore,record_update";
1713
+ readonly raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,read_record,record_delete,record_restore,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,visibility_as_of";
1497
1714
  }, {
1498
1715
  readonly code: "0A000";
1499
1716
  readonly raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_slots_declare";
1500
1717
  }, {
1501
1718
  readonly code: "22004";
1502
- readonly raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_restore,record_update,record_write,relation_own,table_declare,work_template_declare";
1719
+ readonly raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,migrate_undo,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,share_grant,table_declare,work_template_declare";
1503
1720
  }, {
1504
1721
  readonly code: "22012";
1505
1722
  readonly raised_by: "rule_eval";
1506
1723
  }, {
1507
1724
  readonly code: "22023";
1508
- readonly raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,query_by_coordinates,query_rollup,record_update,rule_eval,rule_members,table_rules,work_slot_hold";
1725
+ readonly raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,table_rules,visibility_as_of,work_slot_hold";
1509
1726
  }, {
1510
1727
  readonly code: "23503";
1511
- readonly raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_delete,migrate_demote,migrate_promote,promote_field,promote_table,record_applicability,record_reparent,relation_own,resolve_first_match,rule_applies,rule_eval,rule_members,rule_run,work_take_assignment,work_template_instantiate";
1728
+ readonly raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,delete_rule,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_eval,rule_members,rule_run,work_take_assignment,work_template_instantiate";
1512
1729
  }, {
1513
1730
  readonly code: "23505";
1514
- readonly raised_by: "doc_sign,doc_signature_write,home_add,io_proposal_accept,work_slot_hold";
1731
+ readonly raised_by: "doc_sign,doc_signature_write,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_slot_hold";
1515
1732
  }, {
1516
1733
  readonly code: "23514";
1517
- readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_rule_shape_guard,_rule_topology_guard,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,home_add,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate";
1734
+ readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,field_declare,field_retire,field_update,home_add,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate";
1518
1735
  }, {
1519
1736
  readonly code: "40001";
1520
1737
  readonly raised_by: "has_visibility_at";
1521
1738
  }, {
1522
1739
  readonly code: "42501";
1523
- readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_reach,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,promote_table,read_record,read_records";
1740
+ readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_organization_admin,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,promote_table,query_visibility_parity,read_record,read_records,share_grant,visibility_as_of";
1524
1741
  }, {
1525
1742
  readonly code: "53400";
1526
- readonly raised_by: "anon_rate_take,promote_field";
1743
+ readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
1744
+ }, {
1745
+ readonly code: "54001";
1746
+ readonly raised_by: "record_delete";
1527
1747
  }, {
1528
1748
  readonly code: "PT409";
1529
1749
  readonly raised_by: "record_update";
1530
1750
  }];
1531
1751
  /** `platform.entity_types` — the registered tokens a Table or relation may name. */
1532
- declare const ENTITY_TOKENS: readonly ["access_delta_probe", "access_delta_run", "access_request", "account_addon", "acquisition_block", "activity", "admin_audit_log", "admin_email_log", "admin_markdown_sample", "admin_user", "admission_config", "agent", "agent_card", "agent_definition_version", "agent_drift_alert", "agent_exemplar", "agent_mandate_note", "agent_prompt_remediation", "agent_provision_legacy", "agent_run", "agent_run_stage", "agent_schedule", "agent_schedule_claim", "agent_shortcut", "agent_surface_binding", "agent_template", "agent_usage", "agent_user_kv", "ai_api", "ai_endpoint", "ai_model", "ai_model_alias", "ai_offering", "ai_provider", "ai_setting", "analysis_result", "anon_form", "anon_function_birth_grandfather", "anon_hit", "anon_inbound", "anon_replay", "anon_submission", "anon_token", "api_field_warning", "api_request_log", "app", "app_config", "app_config_history", "app_definition_version", "app_error", "app_execution", "app_instance", "app_log", "app_log_muted_pattern", "app_log_norm_exception", "app_rate_limit", "app_setting", "app_sync_status", "approach", "artifact", "assessment", "assessment_item", "assessment_result", "assignment_session", "assist", "assist_producer_policy", "assist_producer_policy_history", "association_type", "assurance_level", "attempt", "audit_broken_functions", "audit_canonical_findings", "audit_exemption", "audit_function_deps", "audit_function_runtime_probe", "audit_m2m_candidates", "audit_refresh_log", "audit_stale_registry", "audit_unregistered_candidates", "bak_assoc_file_processed_document_20260812", "bak_assoc_type_file_processed_document_20260812", "bak_organization_name_dd043", "base_entity_template", "batch_cost_event", "batch_provider_batch", "batch_work_item", "billing_capability", "billing_capability_limit", "billing_connect_account", "billing_customer", "billing_plan", "billing_plan_limit", "billing_price", "billing_product", "billing_spend_guardrail", "billing_stripe_event", "billing_subscription", "billing_usage_ledger", "billing_user_plan", "browser_account_binding", "browser_action_event", "browser_authenticator_window", "browser_capture", "browser_control_request", "browser_handoff", "browser_login_attempt", "browser_login_recipe", "browser_profile", "browser_profile_checkpoint", "browser_run", "browser_site_observation", "browser_site_policy", "browser_stream_ticket", "build_lock", "calendar_event", "canvas_comment", "canvas_comment_like", "canvas_item", "canvas_item_state", "canvas_like", "canvas_score", "canvas_view", "capture_window", "carrying_rule", "catalog_entries_history", "catalog_entry", "category", "change_type_default", "chat_user_usage_summary", "citations", "class_purchase", "classifier_revision_ledger", "client_callable_door", "client_callable_door_retirement", "client_excluded_column_unregistered", "cmp_entry", "cmp_feedback", "code_file", "code_folder", "code_repository", "coding_session", "coding_session_entry", "comment", "commerce_asset_allocation", "commerce_asset_grading", "commerce_asset_identifier", "commerce_asset_lot_event", "commerce_asset_mandate_result", "commerce_asset_price_factor", "commerce_asset_reshoot_request", "commerce_asset_review", "commerce_asset_unknown", "commerce_certified_printer", "commerce_cloud_sync_connection", "commerce_ebay_business_policy", "commerce_ebay_category", "commerce_ebay_category_aspect", "commerce_ebay_category_tree", "commerce_ebay_custom_policy", "commerce_ebay_inventory_item", "commerce_ebay_inventory_item_group", "commerce_ebay_inventory_item_group_member", "commerce_ebay_inventory_location", "commerce_ebay_listing", "commerce_ebay_marketplace_policy", "commerce_ebay_media_asset", "commerce_ebay_notification_destination", "commerce_ebay_notification_event", "commerce_ebay_notification_subscription", "commerce_ebay_notification_topic", "commerce_ebay_offer", "commerce_ebay_order", "commerce_ebay_order_line_item", "commerce_ebay_shipping_fulfillment", "commerce_ebay_store_category", "commerce_human_correction", "commerce_intake_artifact", "commerce_intake_asset", "commerce_intake_batch", "commerce_label_batch", "commerce_label_code", "commerce_marketplace_account", "commerce_marketplace_account_deletion_audit", "commerce_marketplace_api_call", "commerce_marketplace_rate_budget", "commerce_marketplace_site", "commerce_marketplace_sync_run", "commerce_prediction_outcome", "commerce_print_order", "commerce_product", "commerce_product_channel_ref", "commerce_product_media", "commerce_product_variant", "commerce_recall_audit", "comparison_set", "component_group", "contact_medium", "contact_submission", "content_certification", "content_ir_kind", "content_ir_kind_component", "content_ir_kind_component_incident", "content_ir_kind_conformance", "content_ir_kind_edge", "content_ir_kind_example", "content_ir_kind_instance", "content_ir_kind_surface", "context_access_log", "context_item", "context_item_suggestion", "context_item_value", "context_value_refs", "conversation", "conversation_value", "courts", "credential_attachment", "credential_item", "credential_mutation_receipt", "crm_address", "crm_affiliation", "crm_blocklist_entry", "crm_contact_candidate", "crm_deal", "crm_deal_stage_event", "crm_enrichment_call", "crm_interaction", "crm_merge_candidate", "crm_outreach_list", "crm_outreach_list_member", "crm_party_merge", "crm_registry_ingest_run", "crm_registry_source", "crm_saved_view", "crm_sending_event", "crm_sending_identity", "crm_sending_identity_check", "crm_sending_policy", "custom_entity_definition", "custom_field_definition", "custom_field_target", "custom_record", "cx_agent_memory", "cx_agent_plan", "cx_agent_task", "cx_code_edit", "cx_code_message_file", "cx_conversation_documents", "cx_media", "cx_observational_memory", "cx_observational_memory_event", "cx_pending_injection", "cx_request", "cx_request_snapshot", "cx_tool_trace", "cx_user_request", "cx_user_todo", "dashboard_saved_view", "data_rights_event", "data_store", "data_store_members", "dataset", "dd171_containment_baseline", "dd175_cast", "dd175_component_lane_baseline", "ddl_guard_log", "deck_suggestion", "definer_class_exemption", "definer_client_grant_grandfather", "definer_grant_baseline", "deprecated_relation", "derive_run", "dev_login_audit", "dict_entry", "dict_provider_publication", "dict_setting", "dm_conversation", "dm_message", "dm_participant", "doc_render", "doc_signature", "dockets", "domain_classification", "edge_payload_kind", "egress_device", "egress_pairing", "egress_ticket", "emails", "embedding_cache", "embeddings_google_gemini_2_1536", "embeddings_oai_3_small_1536", "embeddings_voyage_4_large_1024", "embeddings_voyage_code_3_1024", "endpoint_family_sweep_state", "engine_owner_task", "entity_grant", "entity_relationship", "entity_type", "esign_campaign", "esign_campaign_member", "esign_consent_disclosure", "esign_envelope", "esign_envelope_certificate", "esign_envelope_document", "esign_envelope_event", "esign_envelope_external_ref", "esign_envelope_signer", "esign_provider", "esign_provider_binding", "esign_signing_key", "execution_event_cursor", "extension_auth_code", "external_link", "external_source", "extract_sweep_state", "fc_card", "fc_detail", "fc_set", "feature_doc", "feature_knob", "feedback_comments", "feedback_user_messages", "field_component", "file", "file_analysis", "file_entities", "file_overrides", "file_page_annotations", "file_pages", "file_rag_job", "file_version", "files_account_tier", "files_machine_written_prefix", "files_sync_mapping", "files_user_account", "flashcard_data", "flashcard_history", "flashcard_review", "flashcard_set", "flashcard_sets", "flexible_data", "folder", "function_contract", "game_badge", "game_result", "game_room", "global_execution", "global_execution_checkpoint", "global_execution_control", "global_execution_event", "global_meter_entry", "global_origin", "global_request", "google_document", "growth_loop_event", "growth_loop_run", "growth_loop_stage_run", "guardian_link", "guest_conversion_audit", "guest_execution_log", "guest_executions", "guided_checklist_run", "heatmap_save", "hindsight_enrollment", "hindsight_finding", "hindsight_regression_case", "hindsight_replay", "hindsight_replay_step", "hindsight_review", "hr_access_audit", "hr_access_role", "hr_accommodation_request", "hr_ai_evidence", "hr_alert_routing_rule", "hr_application", "hr_approval_authority", "hr_approval_delegation", "hr_asset", "hr_asset_assignment", "hr_attendance_exception", "hr_auto_close_rule", "hr_availability", "hr_background_check", "hr_benefits_event", "hr_calculation_snapshot", "hr_candidate", "hr_candidate_conversion", "hr_candidate_message", "hr_careers_portal", "hr_checklist_item", "hr_checklist_run", "hr_checklist_template", "hr_checklist_template_item", "hr_compensation", "hr_corrective_action", "hr_course", "hr_course_version", "hr_credential", "hr_crew", "hr_deduction_code", "hr_department", "hr_derived_grant", "hr_disposition_event", "hr_earning_code", "hr_eeo_response", "hr_emergency_contact", "hr_employee", "hr_employee_private", "hr_employer_profile", "hr_employment", "hr_employment_pin", "hr_engagement", "hr_establishment", "hr_external_identity", "hr_field_policy", "hr_holiday", "hr_holiday_calendar", "hr_i9", "hr_i9_document", "hr_incident", "hr_incident_party", "hr_interview", "hr_interview_kit", "hr_job_title", "hr_jurisdiction", "hr_jurisdiction_rule", "hr_jurisdiction_rule_class", "hr_jurisdiction_rule_org_decision", "hr_jurisdiction_rule_test", "hr_kiosk_device", "hr_kiosk_session", "hr_labor_target", "hr_leave_case", "hr_leave_enrollment", "hr_leave_ledger", "hr_leave_policy", "hr_leave_request", "hr_legal_hold", "hr_legal_hold_item", "hr_location", "hr_new_hire_report", "hr_offer", "hr_opening", "hr_overtime_alert", "hr_overtime_alert_rule", "hr_overtime_preapproval", "hr_pay_group", "hr_pay_period", "hr_pay_period_employment", "hr_payroll_export", "hr_payroll_export_line", "hr_position_assignment", "hr_posting", "hr_posting_publication", "hr_provider_binding", "hr_provider_event", "hr_provisioning_result", "hr_punch", "hr_recalculation_batch", "hr_record_class", "hr_records_request", "hr_reference_check", "hr_reporting_line", "hr_requisition", "hr_restricted_note", "hr_retention_rule", "hr_role_assignment", "hr_schedule", "hr_schedule_change", "hr_schedule_guidance", "hr_schedule_template", "hr_schedule_template_shift", "hr_scorecard", "hr_separation", "hr_shift", "hr_shift_claim", "hr_staffing_requirement", "hr_survey", "hr_survey_invitation", "hr_survey_question", "hr_survey_response", "hr_tax_registration", "hr_tax_withholding", "hr_time_adjustment", "hr_training_assignment", "hr_training_attempt", "hr_transcript_entry", "hr_verification_letter_request", "hr_work_interval", "hr_workflow_binding", "hr_workflow_decision", "hr_workflow_definition", "hr_workflow_event", "hr_workflow_failure", "hr_workflow_flow_type", "hr_workflow_instance", "hr_workflow_step", "hr_workflow_step_definition", "hr_workweek", "html_extraction", "iam_access_audit", "iam_api_key", "iam_emergency_door_request", "idempotency", "industry", "industry_curator", "infra_status", "ingest_runs", "integration_connection", "integration_connection_resource", "interview_decision_interview", "interview_decision_question", "interview_document_revision", "interview_hole", "interview_question", "interview_session", "interview_turn", "invitation", "invitation_code", "invitation_request", "io_comment", "io_contract", "io_import", "io_outbox", "item", "item_mastery", "judge_verdict", "jurisdiction_policy", "keyword_classification_queue", "kg_alert", "kg_chunk_entities", "kg_chunks", "kg_clusters", "kg_edges", "kg_entities", "kg_entity_aliases", "kg_suggestion_ack", "kg_sweep_queue", "kg_sweep_run", "kg_sweep_state", "kg_value_match", "knob_override", "knob_override_audit", "knob_rung_lock", "knob_scope_kind", "knob_write_door", "league_membership", "learn_doc", "library_doc", "lifecycle_archive", "lifecycle_archive_row", "lifecycle_audit", "lifecycle_entity_plan", "lifecycle_map_build", "lifecycle_reference_map", "lifecycle_run", "lifecycle_tier_ledger", "location", "mandate", "mandate_advance_batch_row", "mandate_binding", "mandate_binding_legacy", "mandate_legacy", "mandate_observation", "mandate_reference", "mandate_scan", "mandate_treatment", "marketing_initiative", "masterwork_corpus_item", "masterwork_run", "masterwork_run_kind", "masterwork_source", "math_course_structure", "math_problem", "matrx_action_ledger", "mcp_config", "mcp_server", "mcp_user_conn", "media_capture_handoff", "media_catalog_setting", "media_library_item", "media_selection_item", "media_selection_job", "media_source_library", "meet_call_invite", "meet_meeting", "meet_note", "meet_participant", "meet_recording", "meet_transcript_segment", "membership", "membership_grant", "merge_field_provenance", "message", "message_template", "meta_excluded_schema", "meta_table_stats_history", "metadata_reserved_keys", "microservice_project", "migration_log", "mtx_media_heal_queue", "mtx_public_url_guard", "ner_shadow", "note", "note_folder", "notification", "notification_channel_preference", "notification_event_override", "notification_event_type", "notification_preference", "notify_outsider_door_baseline", "oauth_handoff_claim", "opinion_clusters", "opinions", "ops_issue_class", "ops_issue_event", "ops_proof_check", "ops_proof_run", "ops_proof_scenario", "org_admin_audit", "org_change_policy", "org_context_ledger", "org_industries", "org_member_control", "org_module_config", "org_plan", "org_repair_0253_backup", "organization", "organization_preferences", "organization_visibility_version", "output_feedback", "outreach_acceptance", "page_extraction_job", "page_extraction_page_run", "page_extraction_results", "page_extraction_runs", "page_intent_queue", "page_mapping_queue", "part_config", "part_config_sub", "party", "party_contact_point", "path_drift_repair_2026_09", "pc_article", "pc_episode", "pc_show", "pc_studio_run", "pc_studio_run_asset", "pdf_consolidation_log", "pdf_redaction_audit", "pdf_redaction_key_escrow", "permission_grant", "plan_cms_fill_item", "plan_cms_fill_job", "plan_entity", "plan_node", "plan_node_artifact", "plan_node_step", "plan_profile", "platform_actor_session", "platform_actor_token", "platform_actor_token_event", "platform_continued_access", "platform_org_knob_override", "platform_outcome_event", "platform_outsider_consumer", "platform_reachability", "platform_reference_category", "platform_reference_declaration", "platform_repo", "platform_saved_view", "platform_schema", "platform_share_link", "platform_user_knob_override", "podcast_race", "policy_overlap_backup", "policy_overlap_probe", "processed_document", "processed_document_page", "product_capture_file", "product_capture_item", "product_capture_payload", "product_capture_product", "product_capture_question", "profile", "project", "prompt", "provider_account", "provider_account_credential", "provision", "provision_generate_target", "provision_grant", "provision_marker", "provision_rule_message", "provision_schema", "provision_shape_debt", "provision_spec", "provision_spec_grandfather", "provision_vocabulary", "purpose", "quiz_session", "rag_ingest_run", "rag_library_audit_log", "rate_limit_buckets", "recompute_queue", "record", "record_alias", "redaction_mapping", "research_analysis", "research_content", "research_context_bundle", "research_document", "research_intent", "research_keyword", "research_media", "research_source", "research_synthesis", "research_tag", "research_template", "research_topic", "retention_policy", "retrieval_audit", "review_queue", "route_manifest_entry", "row_version", "rulebook", "runtime_operation_stream", "runtime_operation_stream_batch", "sandbox_instance", "sch_agent_task", "sch_run", "sch_task", "sch_trigger", "schema_client_exposure", "schema_migration_ledger", "schema_migration_legacy", "schema_migration_slot_grandfather", "schema_templates", "scope", "scope_association_suggestion", "scope_dataset_instance", "scope_door_registry", "scope_item_value_suggestion", "scope_suggestion", "scope_type", "scrape_domain", "scrape_domain_settings", "scrape_failure_log", "scrape_parsed_page", "scrape_path_override", "scrape_path_pattern", "scrape_retry_queue", "seo_ai_capability", "seo_ai_visibility_citation", "seo_ai_visibility_claim", "seo_ai_visibility_panel", "seo_ai_visibility_response", "seo_ai_visibility_signal", "seo_backlink", "seo_backlink_change_event", "seo_backlink_dimension_snapshot", "seo_backlink_observation", "seo_backlink_snapshot", "seo_change_assessment", "seo_change_event", "seo_change_item", "seo_change_metric", "seo_change_set", "seo_change_theory", "seo_collection_run", "seo_competitor", "seo_competitor_observation", "seo_competitor_opportunity", "seo_coverage_mention", "seo_coverage_tracker", "seo_dimension_value_matcher", "seo_engine_schedule", "seo_geo_place", "seo_gsc_dig_rule", "seo_keyword", "seo_keyword_class_rule", "seo_keyword_edge", "seo_keyword_facet", "seo_keyword_market", "seo_keyword_market_observation", "seo_keyword_place", "seo_keyword_saved_view", "seo_keyword_topic", "seo_landscape_brief", "seo_link_gap_domain", "seo_link_gap_match", "seo_map_facet", "seo_map_facet_value", "seo_map_topic", "seo_page_measurement_health", "seo_page_performance", "seo_provider_call", "seo_provider_task", "seo_rank_observation", "seo_rank_target", "seo_raw_payload", "seo_referring_domain_profile", "seo_reputation_case", "seo_search_performance_daily", "seo_serp_mention", "seo_serp_opportunity", "seo_serp_result", "seo_serp_snapshot", "seo_site_geo_area", "seo_site_keyword_offering", "seo_site_keyword_value", "seo_site_offering_value", "seo_site_topic_value", "seo_site_value_combo", "seo_site_value_worth", "seo_site_vocabulary", "seo_source_request", "seo_starter_pack", "seo_starter_pack_item", "seo_story_angle", "seo_topic", "seo_topical_map", "seo_web_analytics_daily", "share_link", "shareable_resource_registry", "shared_canvas_item", "short_link", "shortcut_category", "skill", "skill_category", "skill_render_definition", "sms_consent", "sms_conversation", "sms_message", "sms_message_media", "sms_notification", "sms_notification_preference", "sms_phone_number", "sms_rate_limits", "sms_webhook_logs", "soft_delete_edge", "source_authority", "stage_dockets_966c18eca7", "stage_ref_kind", "stamped_write_table", "structure", "structured_list", "studio_cleaned_segments", "studio_concept_items", "studio_documents", "studio_module_segments", "studio_raw_segments", "studio_recording_chunks", "studio_recording_segments", "studio_run", "studio_session", "studio_session_settings", "study_attempt", "study_goal", "study_media", "study_plan", "study_plan_block", "study_plan_day", "study_reminder_context", "study_reminder_delivery", "study_session", "study_source_chunk", "study_streak", "study_structured_section", "superseded_policy", "surface", "system_announcement", "system_context_item", "system_error", "system_orgs", "system_personal_org_failure", "system_write_failure", "task", "task_user_state", "taxonomy_node", "template_context_items", "template_scope_types", "templates", "thread", "tool", "tool_binding", "tool_bundle", "tool_call", "tool_definition_version", "tool_executor", "tool_surface_defaults", "tool_test_sample", "tool_ui", "tool_ui_incident", "tool_ui_version", "topic_placement_queue", "transcript", "trigger_event", "udt_dataset_fields", "udt_dataset_row_versions", "udt_dataset_rows", "udt_dataset_template", "udt_dataset_template_fields", "udt_document", "udt_document_snapshot", "udt_structured_list_items", "udt_workbook_snapshot", "ui_client", "ui_surface_agent_pref", "ui_surface_agent_role", "ui_surface_client_tool", "ui_surface_config", "ui_surface_value", "ui_surface_write_target", "unsubscribe_token", "uploads_inflight", "user_achievement", "user_active_context", "user_analysis_preference", "user_bookmark", "user_email_preference", "user_entity_state", "user_feedback", "user_follows", "user_form_profile", "user_markdown_sample", "user_memory", "user_preference", "user_profile", "user_secret", "user_secret_audit", "user_secret_grant", "user_stat", "user_storage_usage", "user_surface_state", "visibility_cache", "visibility_epoch", "voice", "war_room", "wbx_capture", "wbx_demo", "wbx_guidance", "wbx_highlight", "wbx_pattern", "wbx_recipe", "wbx_screenshot", "wbx_seo_audit", "wc_claim", "wc_impairment_definition", "wc_injury", "wc_report", "web_analysis_item", "web_brand", "web_brand_asset", "web_brand_offering", "web_business_fact", "web_business_location", "web_channel_analytics_daily", "web_crawl_event", "web_crawl_preset", "web_crawl_schedule", "web_crawl_session", "web_crawl_url", "web_discovered_item", "web_finding", "web_gsc_page_stat", "web_link_edge", "web_listing_publisher", "web_location_listing", "web_offering_template", "web_page", "web_page_content", "web_page_evidence", "web_page_sitemap", "web_property", "web_provider", "web_result", "web_screenshot", "web_site", "web_site_endpoint_rule", "web_site_item_config", "web_site_offering", "web_sitemap", "web_snapshot", "web_tag_manager_snapshot", "web_youtube_video", "webhook_deliveries", "webhook_dispatch_state", "webhooks", "wf_node_data_slot", "work_claim", "work_item", "workbook", "worker_heartbeat", "workflow", "workflow_card", "workflow_checkpoint", "workflow_comparison", "workflow_definition_version", "workflow_idempotency", "workflow_job", "workflow_node_events", "workflow_node_outcome", "workflow_plan", "workflow_plan_event", "workflow_plan_sample", "workflow_recovery_audit", "workflow_run", "workflow_run_log", "workflow_runtime_surface", "workflow_template", "workflow_trigger", "workflow_trigger_fire", "workflow_work_item", "working_document", "write_guard_key", "youtube_quota_day", "youtube_search", "youtube_video"];
1752
+ declare const ENTITY_TOKENS: readonly ["access_delta_probe", "access_delta_run", "access_request", "account_addon", "acquisition_block", "activity", "admin_audit_log", "admin_email_log", "admin_markdown_sample", "admin_user", "admission_config", "agent", "agent_card", "agent_definition_version", "agent_drift_alert", "agent_exemplar", "agent_mandate_note", "agent_prompt_remediation", "agent_provision_legacy", "agent_run", "agent_run_stage", "agent_schedule", "agent_schedule_claim", "agent_shortcut", "agent_surface_binding", "agent_template", "agent_usage", "agent_user_kv", "ai_api", "ai_endpoint", "ai_model", "ai_model_alias", "ai_offering", "ai_provider", "ai_setting", "analysis_result", "anon_form", "anon_function_birth_grandfather", "anon_hit", "anon_inbound", "anon_replay", "anon_submission", "anon_token", "api_field_warning", "api_request_log", "app", "app_config", "app_config_history", "app_definition_version", "app_error", "app_execution", "app_instance", "app_log", "app_log_muted_pattern", "app_log_norm_exception", "app_rate_limit", "app_setting", "app_sync_status", "approach", "artifact", "assessment", "assessment_item", "assessment_result", "assignment_session", "assist", "assist_producer_policy", "assist_producer_policy_history", "association_type", "assurance_level", "attempt", "audit_broken_functions", "audit_canonical_findings", "audit_exemption", "audit_function_deps", "audit_function_runtime_probe", "audit_m2m_candidates", "audit_refresh_log", "audit_stale_registry", "audit_unregistered_candidates", "bak_assoc_file_processed_document_20260812", "bak_assoc_type_file_processed_document_20260812", "bak_organization_name_dd043", "base_entity_template", "batch_cost_event", "batch_provider_batch", "batch_work_item", "billing_capability", "billing_capability_limit", "billing_connect_account", "billing_customer", "billing_plan", "billing_plan_limit", "billing_price", "billing_product", "billing_spend_guardrail", "billing_stripe_event", "billing_subscription", "billing_usage_ledger", "billing_user_plan", "browser_account_binding", "browser_action_event", "browser_authenticator_window", "browser_capture", "browser_control_request", "browser_handoff", "browser_login_attempt", "browser_login_recipe", "browser_profile", "browser_profile_checkpoint", "browser_run", "browser_site_observation", "browser_site_policy", "browser_stream_ticket", "build_lock", "calendar_event", "canvas_comment", "canvas_comment_like", "canvas_item", "canvas_item_state", "canvas_like", "canvas_score", "canvas_view", "capture_window", "carrying_rule", "catalog_entries_history", "catalog_entry", "category", "change_type_default", "chat_user_usage_summary", "citations", "class_purchase", "classifier_revision_ledger", "client_callable_door", "client_callable_door_retirement", "client_excluded_column_unregistered", "cmp_entry", "cmp_feedback", "code_file", "code_folder", "code_repository", "coding_session", "coding_session_entry", "comment", "commerce_asset_allocation", "commerce_asset_grading", "commerce_asset_identifier", "commerce_asset_lot_event", "commerce_asset_mandate_result", "commerce_asset_price_factor", "commerce_asset_reshoot_request", "commerce_asset_review", "commerce_asset_unknown", "commerce_certified_printer", "commerce_cloud_sync_connection", "commerce_ebay_business_policy", "commerce_ebay_category", "commerce_ebay_category_aspect", "commerce_ebay_category_tree", "commerce_ebay_custom_policy", "commerce_ebay_inventory_item", "commerce_ebay_inventory_item_group", "commerce_ebay_inventory_item_group_member", "commerce_ebay_inventory_location", "commerce_ebay_listing", "commerce_ebay_marketplace_policy", "commerce_ebay_media_asset", "commerce_ebay_notification_destination", "commerce_ebay_notification_event", "commerce_ebay_notification_subscription", "commerce_ebay_notification_topic", "commerce_ebay_offer", "commerce_ebay_order", "commerce_ebay_order_line_item", "commerce_ebay_shipping_fulfillment", "commerce_ebay_store_category", "commerce_human_correction", "commerce_intake_artifact", "commerce_intake_asset", "commerce_intake_batch", "commerce_label_batch", "commerce_label_code", "commerce_marketplace_account", "commerce_marketplace_account_deletion_audit", "commerce_marketplace_api_call", "commerce_marketplace_rate_budget", "commerce_marketplace_site", "commerce_marketplace_sync_run", "commerce_prediction_outcome", "commerce_print_order", "commerce_product", "commerce_product_channel_ref", "commerce_product_media", "commerce_product_variant", "commerce_recall_audit", "comparison_set", "component_group", "contact_medium", "contact_submission", "content_certification", "content_ir_kind", "content_ir_kind_component", "content_ir_kind_component_incident", "content_ir_kind_conformance", "content_ir_kind_edge", "content_ir_kind_example", "content_ir_kind_instance", "content_ir_kind_surface", "content_lane", "context_access_log", "context_item", "context_item_suggestion", "context_item_value", "context_value_refs", "conversation", "conversation_value", "courts", "credential_attachment", "credential_item", "credential_mutation_receipt", "crm_address", "crm_affiliation", "crm_blocklist_entry", "crm_contact_candidate", "crm_deal", "crm_deal_stage_event", "crm_enrichment_call", "crm_interaction", "crm_merge_candidate", "crm_outreach_list", "crm_outreach_list_member", "crm_party_merge", "crm_registry_ingest_run", "crm_registry_source", "crm_saved_view", "crm_sending_event", "crm_sending_identity", "crm_sending_identity_check", "crm_sending_policy", "custom_entity_definition", "custom_field_definition", "custom_field_target", "custom_record", "cx_agent_memory", "cx_agent_plan", "cx_agent_task", "cx_code_edit", "cx_code_message_file", "cx_conversation_documents", "cx_media", "cx_observational_memory", "cx_observational_memory_event", "cx_pending_injection", "cx_request", "cx_request_snapshot", "cx_tool_trace", "cx_user_request", "cx_user_todo", "dashboard_saved_view", "data_rights_event", "data_store", "data_store_members", "dataset", "dd171_containment_baseline", "dd175_cast", "dd175_component_lane_baseline", "ddl_guard_log", "deck_suggestion", "definer_class_exemption", "definer_client_grant_grandfather", "definer_grant_baseline", "deprecated_relation", "derive_run", "dev_login_audit", "dict_entry", "dict_provider_publication", "dict_setting", "dm_conversation", "dm_message", "dm_participant", "doc_render", "doc_signature", "dockets", "domain_classification", "edge_payload_kind", "egress_device", "egress_pairing", "egress_ticket", "emails", "embedding_cache", "embeddings_google_gemini_2_1536", "embeddings_oai_3_small_1536", "embeddings_voyage_4_large_1024", "embeddings_voyage_code_3_1024", "endpoint_family_sweep_state", "engine_owner_task", "entity_grant", "entity_relationship", "entity_type", "esign_campaign", "esign_campaign_member", "esign_consent_disclosure", "esign_envelope", "esign_envelope_certificate", "esign_envelope_document", "esign_envelope_event", "esign_envelope_external_ref", "esign_envelope_signer", "esign_provider", "esign_provider_binding", "esign_signing_key", "execution_event_cursor", "extension_auth_code", "external_link", "external_source", "extract_sweep_state", "fc_card", "fc_detail", "fc_set", "feature_doc", "feature_knob", "feedback_comments", "feedback_user_messages", "field_component", "file", "file_analysis", "file_entities", "file_overrides", "file_page_annotations", "file_pages", "file_rag_job", "file_version", "files_account_tier", "files_machine_written_prefix", "files_sync_mapping", "files_user_account", "flashcard_data", "flashcard_history", "flashcard_review", "flashcard_set", "flashcard_sets", "flexible_data", "folder", "function_contract", "game_badge", "game_result", "game_room", "global_execution", "global_execution_checkpoint", "global_execution_control", "global_execution_event", "global_meter_entry", "global_origin", "global_request", "google_document", "growth_loop_event", "growth_loop_run", "growth_loop_stage_run", "guardian_link", "guest_conversion_audit", "guest_execution_log", "guest_executions", "guided_checklist_run", "heatmap_save", "hindsight_enrollment", "hindsight_finding", "hindsight_regression_case", "hindsight_replay", "hindsight_replay_step", "hindsight_review", "hr_access_audit", "hr_access_role", "hr_accommodation_request", "hr_ai_evidence", "hr_alert_routing_rule", "hr_application", "hr_approval_authority", "hr_approval_delegation", "hr_asset", "hr_asset_assignment", "hr_attendance_exception", "hr_auto_close_rule", "hr_availability", "hr_background_check", "hr_benefits_event", "hr_calculation_snapshot", "hr_candidate", "hr_candidate_conversion", "hr_candidate_message", "hr_careers_portal", "hr_checklist_item", "hr_checklist_run", "hr_checklist_template", "hr_checklist_template_item", "hr_compensation", "hr_corrective_action", "hr_course", "hr_course_version", "hr_credential", "hr_crew", "hr_deduction_code", "hr_department", "hr_derived_grant", "hr_disposition_event", "hr_earning_code", "hr_eeo_response", "hr_emergency_contact", "hr_employee", "hr_employee_private", "hr_employer_profile", "hr_employment", "hr_employment_pin", "hr_engagement", "hr_establishment", "hr_external_identity", "hr_field_policy", "hr_holiday", "hr_holiday_calendar", "hr_i9", "hr_i9_document", "hr_incident", "hr_incident_party", "hr_interview", "hr_interview_kit", "hr_job_title", "hr_jurisdiction", "hr_jurisdiction_rule", "hr_jurisdiction_rule_class", "hr_jurisdiction_rule_org_decision", "hr_jurisdiction_rule_test", "hr_kiosk_device", "hr_kiosk_session", "hr_labor_target", "hr_leave_case", "hr_leave_enrollment", "hr_leave_ledger", "hr_leave_policy", "hr_leave_request", "hr_legal_hold", "hr_legal_hold_item", "hr_location", "hr_new_hire_report", "hr_offer", "hr_opening", "hr_overtime_alert", "hr_overtime_alert_rule", "hr_overtime_preapproval", "hr_pay_group", "hr_pay_period", "hr_pay_period_employment", "hr_payroll_export", "hr_payroll_export_line", "hr_position_assignment", "hr_posting", "hr_posting_publication", "hr_provider_binding", "hr_provider_event", "hr_provisioning_result", "hr_punch", "hr_recalculation_batch", "hr_record_class", "hr_records_request", "hr_reference_check", "hr_reporting_line", "hr_requisition", "hr_restricted_note", "hr_retention_rule", "hr_role_assignment", "hr_schedule", "hr_schedule_change", "hr_schedule_guidance", "hr_schedule_template", "hr_schedule_template_shift", "hr_scorecard", "hr_separation", "hr_shift", "hr_shift_claim", "hr_staffing_requirement", "hr_survey", "hr_survey_invitation", "hr_survey_question", "hr_survey_response", "hr_tax_registration", "hr_tax_withholding", "hr_time_adjustment", "hr_training_assignment", "hr_training_attempt", "hr_transcript_entry", "hr_verification_letter_request", "hr_work_interval", "hr_workflow_binding", "hr_workflow_decision", "hr_workflow_definition", "hr_workflow_event", "hr_workflow_failure", "hr_workflow_flow_type", "hr_workflow_instance", "hr_workflow_step", "hr_workflow_step_definition", "hr_workweek", "html_extraction", "iam_access_audit", "iam_api_key", "iam_emergency_door_request", "idempotency", "industry", "industry_curator", "infra_status", "ingest_runs", "integration_connection", "integration_connection_resource", "interview_decision_interview", "interview_decision_question", "interview_document_revision", "interview_hole", "interview_question", "interview_session", "interview_turn", "invitation", "invitation_code", "invitation_request", "io_comment", "io_contract", "io_import", "io_outbox", "item", "item_mastery", "judge_verdict", "jurisdiction_policy", "keyword_classification_queue", "kg_alert", "kg_chunk_entities", "kg_chunks", "kg_clusters", "kg_edges", "kg_entities", "kg_entity_aliases", "kg_suggestion_ack", "kg_sweep_queue", "kg_sweep_run", "kg_sweep_state", "kg_value_match", "knob_override", "knob_override_audit", "knob_rung_lock", "knob_scope_kind", "knob_write_door", "league_membership", "learn_doc", "library_doc", "lifecycle_archive", "lifecycle_archive_row", "lifecycle_audit", "lifecycle_entity_plan", "lifecycle_map_build", "lifecycle_reference_map", "lifecycle_run", "lifecycle_tier_ledger", "location", "mandate", "mandate_advance_batch_row", "mandate_binding", "mandate_binding_legacy", "mandate_legacy", "mandate_observation", "mandate_reference", "mandate_scan", "mandate_treatment", "marketing_initiative", "masterwork_corpus_item", "masterwork_run", "masterwork_run_kind", "masterwork_source", "math_course_structure", "math_problem", "matrx_action_ledger", "mcp_config", "mcp_server", "mcp_user_conn", "media_capture_handoff", "media_catalog_setting", "media_library_item", "media_selection_item", "media_selection_job", "media_source_library", "meet_call_invite", "meet_meeting", "meet_note", "meet_participant", "meet_recording", "meet_transcript_segment", "membership", "membership_grant", "merge_field_provenance", "message", "message_template", "meta_excluded_schema", "meta_table_stats_history", "metadata_reserved_keys", "microservice_project", "migration_log", "mtx_media_heal_queue", "mtx_public_url_guard", "ner_shadow", "note", "note_folder", "notification", "notification_channel_preference", "notification_event_override", "notification_event_type", "notification_preference", "notify_outsider_door_baseline", "oauth_handoff_claim", "opinion_clusters", "opinions", "ops_issue_class", "ops_issue_event", "ops_proof_check", "ops_proof_run", "ops_proof_scenario", "org_admin_audit", "org_change_policy", "org_context_ledger", "org_industries", "org_member_control", "org_module_config", "org_plan", "org_repair_0253_backup", "organization", "organization_preferences", "organization_visibility_version", "output_feedback", "outreach_acceptance", "page_extraction_job", "page_extraction_page_run", "page_extraction_results", "page_extraction_runs", "page_intent_queue", "page_mapping_queue", "part_config", "part_config_sub", "party", "party_contact_point", "passkey_credential", "path_drift_repair_2026_09", "pc_article", "pc_episode", "pc_show", "pc_studio_run", "pc_studio_run_asset", "pdf_consolidation_log", "pdf_redaction_audit", "pdf_redaction_key_escrow", "permission_grant", "plan_cms_fill_item", "plan_cms_fill_job", "plan_entity", "plan_node", "plan_node_artifact", "plan_node_step", "plan_profile", "platform_actor_session", "platform_actor_token", "platform_actor_token_event", "platform_continued_access", "platform_org_knob_override", "platform_outcome_event", "platform_outsider_consumer", "platform_reachability", "platform_reference_category", "platform_reference_declaration", "platform_repo", "platform_saved_view", "platform_schema", "platform_share_link", "platform_user_knob_override", "podcast_race", "policy_overlap_backup", "policy_overlap_probe", "processed_document", "processed_document_page", "product_capture_file", "product_capture_item", "product_capture_payload", "product_capture_product", "product_capture_question", "profile", "project", "prompt", "provider_account", "provider_account_credential", "provision", "provision_generate_target", "provision_grant", "provision_marker", "provision_rule_message", "provision_schema", "provision_shape_debt", "provision_spec", "provision_spec_grandfather", "provision_vocabulary", "purpose", "quiz_session", "rag_ingest_run", "rag_library_audit_log", "rate_limit_buckets", "recompute_queue", "record", "record_alias", "redaction_mapping", "research_analysis", "research_content", "research_context_bundle", "research_document", "research_intent", "research_keyword", "research_media", "research_source", "research_synthesis", "research_tag", "research_template", "research_topic", "retention_policy", "retrieval_audit", "review_queue", "route_manifest_entry", "row_version", "rulebook", "runtime_operation_stream", "runtime_operation_stream_batch", "sandbox_instance", "sch_agent_task", "sch_run", "sch_task", "sch_trigger", "schema_client_exposure", "schema_migration_ledger", "schema_migration_legacy", "schema_migration_slot_grandfather", "schema_templates", "scope", "scope_association_suggestion", "scope_dataset_instance", "scope_door_registry", "scope_item_value_suggestion", "scope_suggestion", "scope_type", "scrape_domain", "scrape_domain_settings", "scrape_failure_log", "scrape_parsed_page", "scrape_path_override", "scrape_path_pattern", "scrape_retry_queue", "seo_ai_capability", "seo_ai_visibility_citation", "seo_ai_visibility_claim", "seo_ai_visibility_panel", "seo_ai_visibility_response", "seo_ai_visibility_signal", "seo_backlink", "seo_backlink_change_event", "seo_backlink_dimension_snapshot", "seo_backlink_observation", "seo_backlink_snapshot", "seo_change_assessment", "seo_change_event", "seo_change_item", "seo_change_metric", "seo_change_set", "seo_change_theory", "seo_collection_run", "seo_competitor", "seo_competitor_observation", "seo_competitor_opportunity", "seo_coverage_mention", "seo_coverage_tracker", "seo_dimension_value_matcher", "seo_engine_schedule", "seo_geo_place", "seo_gsc_dig_rule", "seo_keyword", "seo_keyword_class_rule", "seo_keyword_edge", "seo_keyword_facet", "seo_keyword_market", "seo_keyword_market_observation", "seo_keyword_place", "seo_keyword_saved_view", "seo_keyword_topic", "seo_landscape_brief", "seo_link_gap_domain", "seo_link_gap_match", "seo_map_facet", "seo_map_facet_value", "seo_map_topic", "seo_page_measurement_health", "seo_page_performance", "seo_provider_call", "seo_provider_task", "seo_rank_observation", "seo_rank_target", "seo_raw_payload", "seo_referring_domain_profile", "seo_reputation_case", "seo_search_performance_daily", "seo_serp_mention", "seo_serp_opportunity", "seo_serp_result", "seo_serp_snapshot", "seo_site_geo_area", "seo_site_keyword_offering", "seo_site_keyword_value", "seo_site_offering_value", "seo_site_topic_value", "seo_site_value_combo", "seo_site_value_worth", "seo_site_vocabulary", "seo_source_request", "seo_starter_pack", "seo_starter_pack_item", "seo_story_angle", "seo_topic", "seo_topical_map", "seo_web_analytics_daily", "share_link", "shareable_resource_registry", "shared_canvas_item", "short_link", "shortcut_category", "skill", "skill_category", "skill_render_definition", "sms_consent", "sms_conversation", "sms_message", "sms_message_media", "sms_notification", "sms_notification_preference", "sms_phone_number", "sms_rate_limits", "sms_webhook_logs", "soft_delete_edge", "source_authority", "stage_dockets_966c18eca7", "stage_ref_kind", "stamped_write_table", "structure", "structured_list", "studio_cleaned_segments", "studio_concept_items", "studio_documents", "studio_module_segments", "studio_raw_segments", "studio_recording_chunks", "studio_recording_segments", "studio_run", "studio_session", "studio_session_settings", "study_attempt", "study_goal", "study_media", "study_plan", "study_plan_block", "study_plan_day", "study_reminder_context", "study_reminder_delivery", "study_session", "study_source_chunk", "study_streak", "study_structured_section", "superseded_policy", "surface", "system_announcement", "system_context_item", "system_error", "system_orgs", "system_personal_org_failure", "system_write_failure", "task", "task_user_state", "taxonomy_node", "template_context_items", "template_scope_types", "templates", "thread", "tool", "tool_binding", "tool_bundle", "tool_call", "tool_definition_version", "tool_executor", "tool_surface_defaults", "tool_test_sample", "tool_ui", "tool_ui_incident", "tool_ui_version", "topic_placement_queue", "transcript", "trigger_event", "udt_dataset_fields", "udt_dataset_row_versions", "udt_dataset_rows", "udt_dataset_template", "udt_dataset_template_fields", "udt_document", "udt_document_snapshot", "udt_structured_list_items", "udt_workbook_snapshot", "ui_client", "ui_surface_agent_pref", "ui_surface_agent_role", "ui_surface_client_tool", "ui_surface_config", "ui_surface_value", "ui_surface_write_target", "unsubscribe_token", "uploads_inflight", "user_achievement", "user_active_context", "user_analysis_preference", "user_bookmark", "user_email_preference", "user_entity_state", "user_feedback", "user_follows", "user_form_profile", "user_markdown_sample", "user_memory", "user_preference", "user_profile", "user_secret", "user_secret_audit", "user_secret_grant", "user_stat", "user_storage_usage", "user_surface_state", "visibility_cache", "visibility_epoch", "voice", "war_room", "wbx_capture", "wbx_demo", "wbx_guidance", "wbx_highlight", "wbx_pattern", "wbx_recipe", "wbx_screenshot", "wbx_seo_audit", "wc_claim", "wc_impairment_definition", "wc_injury", "wc_report", "web_analysis_item", "web_brand", "web_brand_asset", "web_brand_offering", "web_business_fact", "web_business_location", "web_channel_analytics_daily", "web_crawl_event", "web_crawl_preset", "web_crawl_schedule", "web_crawl_session", "web_crawl_url", "web_discovered_item", "web_finding", "web_gsc_page_stat", "web_link_edge", "web_listing_publisher", "web_location_listing", "web_offering_template", "web_page", "web_page_content", "web_page_evidence", "web_page_sitemap", "web_property", "web_provider", "web_result", "web_screenshot", "web_site", "web_site_endpoint_rule", "web_site_item_config", "web_site_offering", "web_sitemap", "web_snapshot", "web_tag_manager_snapshot", "web_youtube_video", "webhook_deliveries", "webhook_dispatch_state", "webhooks", "wf_node_data_slot", "work_claim", "work_item", "workbook", "worker_heartbeat", "workflow", "workflow_card", "workflow_checkpoint", "workflow_comparison", "workflow_definition_version", "workflow_idempotency", "workflow_job", "workflow_node_events", "workflow_node_outcome", "workflow_plan", "workflow_plan_event", "workflow_plan_sample", "workflow_recovery_audit", "workflow_run", "workflow_run_log", "workflow_runtime_surface", "workflow_template", "workflow_trigger", "workflow_trigger_fire", "workflow_work_item", "working_document", "write_guard_key", "youtube_quota_day", "youtube_search", "youtube_video"];
1533
1753
  type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number]["code"];
1534
1754
  type StoreDoorName = (typeof STORE_DOORS)[number]["name"];
1535
1755
  type EntityToken = (typeof ENTITY_TOKENS)[number];
@@ -1998,6 +2218,69 @@ interface TableProposal {
1998
2218
  fields: Array<Omit<FieldProposal, "table_id" | "because">>;
1999
2219
  because: string;
2000
2220
  }
2221
+ /**
2222
+ * WHAT A PERSON SAYS WHEN THEY ADD A COLUMN — the argument of
2223
+ * `custom.field_declare`, and deliberately NOT a `Field`.
2224
+ *
2225
+ * A `Field` is what the store STORES: a behaviour from a closed set of five,
2226
+ * modifiers beside it, a format, a unit, a relation target, a relation maximum,
2227
+ * an on-delete word, a compute_on, and the attached Rules that make a format
2228
+ * enforceable. A person adding a column knows none of that. They know they want
2229
+ * a date, or a person, or a list with these three choices in it.
2230
+ *
2231
+ * Every client that tried to bridge that gap itself got it wrong — the field
2232
+ * panel picked "Person" and the store read a Formula — so the bridge is the
2233
+ * STORE's, once, and this is the shape it takes.
2234
+ */
2235
+ interface NewFieldDeclaration {
2236
+ /** What a person reads on the column. The only thing that is always required. */
2237
+ label: string;
2238
+ /** One of the thirteen. Absent means one of the three plain behaviours below. */
2239
+ parity_type?: ParityFieldType;
2240
+ /** Plain text, a long text or a plain number — the three that carry no parity type. */
2241
+ plain?: "text" | "long_text" | "number";
2242
+ /** Derived from the label when absent, which is why the panel never asks for it. */
2243
+ key?: string;
2244
+ required?: boolean;
2245
+ multi?: boolean;
2246
+ dated?: boolean;
2247
+ sort?: number;
2248
+ sensitivity?: FieldSensitivity;
2249
+ context_policy?: ContextPolicy;
2250
+ rules?: FieldRule[];
2251
+ /** A choice list's choices, as words. The store keeps them as a Table (FLD-5 / FLD-6). */
2252
+ options?: string[];
2253
+ /** …or the Table they already come from, when a person picked an existing list. */
2254
+ options_table_id?: Uuid;
2255
+ /** The currency symbol or code a currency field's numbers are in (FLD-N-1). */
2256
+ unit?: string;
2257
+ /** A date field: a day, or a day and a time. */
2258
+ kind?: "date" | "datetime";
2259
+ /** A lookup or a rollup: the key of the relation Field on THIS table it travels along. */
2260
+ via?: string;
2261
+ /** A lookup: the key of the value it reads on the far side. */
2262
+ pick?: string;
2263
+ /** A rollup: what it works out, and of which far-side field (`count` needs none). */
2264
+ agg?: "sum" | "count" | "min" | "max" | "avg";
2265
+ of?: string;
2266
+ /** A formula: the expression, in the same shape a Rule uses (REC-15). */
2267
+ expr?: Record<string, unknown>;
2268
+ compute_on?: ComputeOn;
2269
+ relation_max?: number;
2270
+ }
2271
+ /** What `custom.field_update` accepts: a field's settings, never what it holds. */
2272
+ interface FieldPatch {
2273
+ label?: string;
2274
+ required?: boolean;
2275
+ dated?: boolean;
2276
+ sort?: number;
2277
+ sensitivity?: FieldSensitivity;
2278
+ context_policy?: ContextPolicy;
2279
+ unit?: string;
2280
+ rules?: FieldRule[];
2281
+ /** The choices of a choice list, rewritten. A choice still wanted keeps its id. */
2282
+ options?: string[];
2283
+ }
2001
2284
 
2002
2285
  /**
2003
2286
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -2537,7 +2820,12 @@ type RecordsErrorCode =
2537
2820
  | "door"
2538
2821
  /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */
2539
2822
  | "refused_by_rule"
2540
- /** `22004` / `22023` — the call itself was malformed: a missing id, a patch that is not an object. */
2823
+ /**
2824
+ * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a
2825
+ * patch that is not an object, or a value that does not fit the type the
2826
+ * store holds for that Field. The store's own message names the value and the
2827
+ * type it could not be read as.
2828
+ */
2541
2829
  | "invalid_argument"
2542
2830
  /** `02000` — the record is not here (deleted, never existed, or another organization's). */
2543
2831
  | "not_found"
@@ -2556,6 +2844,13 @@ type RecordsErrorCode =
2556
2844
  * connection; it is the one refusal in this list that is worth repeating.
2557
2845
  */
2558
2846
  | "stale_read"
2847
+ /**
2848
+ * `57014` — the store cancelled the statement at its own timeout. Nothing was
2849
+ * refused on its merits and nothing was written; the same call can succeed on
2850
+ * a smaller page or a quieter moment. With `stale_read`, one of the only two
2851
+ * refusals in this list worth repeating.
2852
+ */
2853
+ | "timed_out"
2559
2854
  /**
2560
2855
  * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database —
2561
2856
  * this package asked for a door that is not in the live catalogue, so it
@@ -2786,4 +3081,4 @@ interface RecordsConfig {
2786
3081
  schema?: string;
2787
3082
  }
2788
3083
 
2789
- export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ComputeOn, type ContextPolicy, DELIVERIES, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type ForbiddenEnvelopeWord, type Freshness, type HiddenFieldNotice, type Home, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PgError, type PredictedRefusal, type ProvenancePointer, type PublishBinding, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordDocument, type RecordRead, type RecordRevision, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, err, isRecordsErr, measureKey, ok };
3084
+ export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ComputeOn, type ContextPolicy, DELIVERIES, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type ForbiddenEnvelopeWord, type Freshness, type HiddenFieldNotice, type Home, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PgError, type PredictedRefusal, type ProvenancePointer, type PublishBinding, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordDocument, type RecordRead, type RecordRevision, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, err, isRecordsErr, measureKey, ok };