@ai-matrx/records 0.5.1 → 0.7.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.
@@ -182,11 +182,21 @@ declare const STORE_DOORS: readonly [{
182
182
  readonly args: "p_declared text";
183
183
  readonly returns: "text";
184
184
  readonly security: "invoker";
185
+ }, {
186
+ readonly name: "agent_change_approval";
187
+ readonly args: "p_organization uuid, p_conversation uuid DEFAULT NULL::uuid, p_table uuid DEFAULT NULL::uuid";
188
+ readonly returns: "jsonb";
189
+ readonly security: "definer";
185
190
  }, {
186
191
  readonly name: "agent_context";
187
192
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50";
188
193
  readonly returns: "jsonb";
189
194
  readonly security: "invoker";
195
+ }, {
196
+ readonly name: "agent_table_claim";
197
+ readonly args: "p_organization uuid, p_table uuid, p_conversation uuid DEFAULT NULL::uuid";
198
+ readonly returns: "void";
199
+ readonly security: "definer";
190
200
  }, {
191
201
  readonly name: "agg_assert_key";
192
202
  readonly args: "p_key text";
@@ -211,7 +221,7 @@ declare const STORE_DOORS: readonly [{
211
221
  readonly name: "agg_explain";
212
222
  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";
213
223
  readonly returns: "jsonb";
214
- readonly security: "invoker";
224
+ readonly security: "definer";
215
225
  }, {
216
226
  readonly name: "agg_operations";
217
227
  readonly args: "";
@@ -272,6 +282,11 @@ declare const STORE_DOORS: readonly [{
272
282
  readonly args: "p_organization_id uuid, p_form_id uuid, p_bucket text, p_token_id uuid DEFAULT NULL::uuid";
273
283
  readonly returns: "integer";
274
284
  readonly security: "definer";
285
+ }, {
286
+ readonly name: "anon_submissions";
287
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0";
288
+ readonly returns: "TABLE(id uuid, form_id uuid, inbound_id uuid, table_id uuid, source text, state text, payload jsonb, raw_payload jsonb, client_key text, record_id uuid, remote_origin text, rejection_reason text, created_at timestamp with time zone, cleared_at timestamp with time zone)";
289
+ readonly security: "definer";
275
290
  }, {
276
291
  readonly name: "anon_token_issue";
277
292
  readonly args: "p_organization_id uuid, p_mode text, p_allowed_origins jsonb, p_form_id uuid DEFAULT NULL::uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid, p_expires_at timestamp with time zone DEFAULT NULL::timestamp with time zone";
@@ -302,11 +317,26 @@ declare const STORE_DOORS: readonly [{
302
317
  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";
303
318
  readonly returns: "void";
304
319
  readonly security: "invoker";
320
+ }, {
321
+ readonly name: "assert_client_may_open";
322
+ 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";
323
+ readonly returns: "void";
324
+ readonly security: "invoker";
305
325
  }, {
306
326
  readonly name: "assert_client_may_reach";
307
327
  readonly args: "p_organization_id uuid, p_door text";
308
328
  readonly returns: "void";
309
329
  readonly security: "invoker";
330
+ }, {
331
+ readonly name: "assert_may_know_table";
332
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_door text";
333
+ readonly returns: "void";
334
+ readonly security: "invoker";
335
+ }, {
336
+ readonly name: "assert_organization_admin";
337
+ readonly args: "p_organization_id uuid, p_door text, p_what text";
338
+ readonly returns: "void";
339
+ readonly security: "invoker";
310
340
  }, {
311
341
  readonly name: "assert_organization_wall";
312
342
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
@@ -332,6 +362,16 @@ declare const STORE_DOORS: readonly [{
332
362
  readonly args: "";
333
363
  readonly returns: "name";
334
364
  readonly security: "invoker";
365
+ }, {
366
+ readonly name: "carrying_edges_in";
367
+ readonly args: "p_organization_id uuid";
368
+ readonly returns: "TABLE(container_type text, container_id uuid, item_type text, item_id uuid, conveys_max permission_level)";
369
+ readonly security: "definer";
370
+ }, {
371
+ readonly name: "carrying_edges_of";
372
+ readonly args: "p_item_type text, p_item_id uuid";
373
+ readonly returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)";
374
+ readonly security: "definer";
335
375
  }, {
336
376
  readonly name: "client_write_grants";
337
377
  readonly args: "";
@@ -362,11 +402,31 @@ declare const STORE_DOORS: readonly [{
362
402
  readonly args: "p_data jsonb";
363
403
  readonly returns: "uuid";
364
404
  readonly security: "invoker";
405
+ }, {
406
+ readonly name: "cross_organization_links_open";
407
+ readonly args: "p_source_organization_id uuid, p_target_organization_id uuid";
408
+ readonly returns: "boolean";
409
+ readonly security: "invoker";
365
410
  }, {
366
411
  readonly name: "custom_fields_tables";
367
412
  readonly args: "";
368
413
  readonly returns: "TABLE(token text, schema_name text, table_name text)";
369
414
  readonly security: "invoker";
415
+ }, {
416
+ readonly name: "delete_cascade_closure";
417
+ readonly args: "p_organization_id uuid, p_record_id uuid";
418
+ readonly returns: "uuid[]";
419
+ readonly security: "invoker";
420
+ }, {
421
+ readonly name: "delete_preview";
422
+ readonly args: "p_organization_id uuid, p_record_id uuid";
423
+ readonly returns: "jsonb";
424
+ readonly security: "definer";
425
+ }, {
426
+ readonly name: "delete_rule";
427
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true";
428
+ readonly returns: "jsonb";
429
+ readonly security: "definer";
370
430
  }, {
371
431
  readonly name: "dependency_cycle";
372
432
  readonly args: "p_organization_id uuid, p_row custom.record";
@@ -522,11 +582,21 @@ declare const STORE_DOORS: readonly [{
522
582
  readonly args: "p_organization_id uuid, p_source_id uuid, p_enabled boolean";
523
583
  readonly returns: "boolean";
524
584
  readonly security: "definer";
585
+ }, {
586
+ readonly name: "field_behaviour";
587
+ readonly args: "p_field_data jsonb";
588
+ readonly returns: "text";
589
+ readonly security: "invoker";
590
+ }, {
591
+ readonly name: "field_declare";
592
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb";
593
+ readonly returns: "uuid";
594
+ readonly security: "definer";
525
595
  }, {
526
596
  readonly name: "field_dependants";
527
597
  readonly args: "p_organization_id uuid, p_field_id uuid";
528
598
  readonly returns: "TABLE(kind text, dependant_id uuid, label text, how text)";
529
- readonly security: "invoker";
599
+ readonly security: "definer";
530
600
  }, {
531
601
  readonly name: "field_kernel_id";
532
602
  readonly args: "";
@@ -536,12 +606,27 @@ declare const STORE_DOORS: readonly [{
536
606
  readonly name: "field_options";
537
607
  readonly args: "p_organization_id uuid, p_field_id uuid";
538
608
  readonly returns: "SETOF custom.record";
539
- readonly security: "invoker";
609
+ readonly security: "definer";
610
+ }, {
611
+ readonly name: "field_retire";
612
+ readonly args: "p_organization_id uuid, p_field_id uuid";
613
+ readonly returns: "boolean";
614
+ readonly security: "definer";
540
615
  }, {
541
616
  readonly name: "field_rules";
542
617
  readonly args: "p_field_data jsonb";
543
618
  readonly returns: "TABLE(kind text, spec jsonb)";
544
619
  readonly security: "invoker";
620
+ }, {
621
+ readonly name: "field_update";
622
+ readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb";
623
+ readonly returns: "uuid";
624
+ readonly security: "definer";
625
+ }, {
626
+ readonly name: "field_value_convert";
627
+ readonly args: "p_to jsonb, p_value jsonb";
628
+ readonly returns: "jsonb";
629
+ readonly security: "invoker";
545
630
  }, {
546
631
  readonly name: "file_kernel_id";
547
632
  readonly args: "";
@@ -552,6 +637,11 @@ declare const STORE_DOORS: readonly [{
552
637
  readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb";
553
638
  readonly returns: "jsonb";
554
639
  readonly security: "invoker";
640
+ }, {
641
+ readonly name: "guard_refusals_are_complete";
642
+ readonly args: "";
643
+ readonly returns: "TABLE(guard text, said text)";
644
+ readonly security: "invoker";
555
645
  }, {
556
646
  readonly name: "has_visibility";
557
647
  readonly args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level";
@@ -567,11 +657,31 @@ declare const STORE_DOORS: readonly [{
567
657
  readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text";
568
658
  readonly returns: "jsonb";
569
659
  readonly security: "invoker";
660
+ }, {
661
+ readonly name: "history_prune";
662
+ 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";
663
+ readonly returns: "jsonb";
664
+ readonly security: "definer";
665
+ }, {
666
+ readonly name: "history_retention";
667
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
668
+ readonly returns: "jsonb";
669
+ readonly security: "definer";
670
+ }, {
671
+ readonly name: "history_retention_floor_raise";
672
+ readonly args: "p_organization_id uuid, p_days integer";
673
+ readonly returns: "integer";
674
+ readonly security: "definer";
675
+ }, {
676
+ readonly name: "history_retention_set";
677
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_days integer";
678
+ readonly returns: "integer";
679
+ readonly security: "definer";
570
680
  }, {
571
681
  readonly name: "home_add";
572
682
  readonly args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid";
573
683
  readonly returns: "uuid";
574
- readonly security: "invoker";
684
+ readonly security: "definer";
575
685
  }, {
576
686
  readonly name: "home_relations";
577
687
  readonly args: "";
@@ -629,7 +739,7 @@ declare const STORE_DOORS: readonly [{
629
739
  readonly security: "definer";
630
740
  }, {
631
741
  readonly name: "io_export_csv";
632
- 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";
742
+ 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";
633
743
  readonly returns: "text";
634
744
  readonly security: "definer";
635
745
  }, {
@@ -685,8 +795,13 @@ declare const STORE_DOORS: readonly [{
685
795
  }, {
686
796
  readonly name: "io_revisions";
687
797
  readonly args: "p_organization_id uuid, p_record_id uuid";
688
- readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text)";
798
+ readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)";
689
799
  readonly security: "definer";
800
+ }, {
801
+ readonly name: "is_a_retirement";
802
+ readonly args: "p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text";
803
+ readonly returns: "boolean";
804
+ readonly security: "invoker";
690
805
  }, {
691
806
  readonly name: "lookup_value";
692
807
  readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb";
@@ -711,52 +826,72 @@ declare const STORE_DOORS: readonly [{
711
826
  readonly name: "migrate_delete";
712
827
  readonly args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text";
713
828
  readonly returns: "jsonb";
714
- readonly security: "invoker";
829
+ readonly security: "definer";
715
830
  }, {
716
831
  readonly name: "migrate_demote";
717
832
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
718
833
  readonly returns: "jsonb";
719
- readonly security: "invoker";
834
+ readonly security: "definer";
720
835
  }, {
721
836
  readonly name: "migrate_extract_parent";
722
837
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
723
838
  readonly returns: "jsonb";
724
- readonly security: "invoker";
839
+ readonly security: "definer";
725
840
  }, {
726
841
  readonly name: "migrate_merge";
727
842
  readonly args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text";
728
843
  readonly returns: "jsonb";
729
- readonly security: "invoker";
844
+ readonly security: "definer";
730
845
  }, {
731
846
  readonly name: "migrate_promote";
732
847
  readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text";
733
848
  readonly returns: "jsonb";
734
- readonly security: "invoker";
849
+ readonly security: "definer";
735
850
  }, {
736
851
  readonly name: "migrate_purge";
737
852
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
738
853
  readonly returns: "jsonb";
739
- readonly security: "invoker";
854
+ readonly security: "definer";
740
855
  }, {
741
856
  readonly name: "migrate_rename";
742
857
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
743
858
  readonly returns: "jsonb";
744
- readonly security: "invoker";
859
+ readonly security: "definer";
745
860
  }, {
746
861
  readonly name: "migrate_reparent";
747
862
  readonly args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text";
748
863
  readonly returns: "jsonb";
749
- readonly security: "invoker";
864
+ readonly security: "definer";
750
865
  }, {
751
866
  readonly name: "migrate_retype";
752
867
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
753
868
  readonly returns: "jsonb";
754
- readonly security: "invoker";
869
+ readonly security: "definer";
755
870
  }, {
756
871
  readonly name: "migrate_split";
757
872
  readonly args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text";
758
873
  readonly returns: "jsonb";
759
- readonly security: "invoker";
874
+ readonly security: "definer";
875
+ }, {
876
+ readonly name: "migrate_undo";
877
+ readonly args: "p_organization_id uuid, p_log_id uuid";
878
+ readonly returns: "jsonb";
879
+ readonly security: "definer";
880
+ }, {
881
+ readonly name: "migrations";
882
+ readonly args: "p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100";
883
+ readonly returns: "TABLE(id uuid, verb text, target_kind text, target_id uuid, note text, applied_at timestamp with time zone, applied_by uuid, undone_at timestamp with time zone)";
884
+ readonly security: "definer";
885
+ }, {
886
+ readonly name: "my_level";
887
+ readonly args: "p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
888
+ readonly returns: "permission_level";
889
+ readonly security: "definer";
890
+ }, {
891
+ readonly name: "my_levels";
892
+ readonly args: "p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text";
893
+ readonly returns: "TABLE(id uuid, level permission_level)";
894
+ readonly security: "definer";
760
895
  }, {
761
896
  readonly name: "organization_kernel_id";
762
897
  readonly args: "";
@@ -767,6 +902,16 @@ declare const STORE_DOORS: readonly [{
767
902
  readonly args: "p_kind text, p_organization_id uuid, p_row jsonb";
768
903
  readonly returns: "TABLE(site text, what text, ref_id uuid, openable boolean)";
769
904
  readonly security: "invoker";
905
+ }, {
906
+ readonly name: "owning_table";
907
+ readonly args: "p_organization_id uuid, p_record_id uuid";
908
+ readonly returns: "uuid";
909
+ readonly security: "invoker";
910
+ }, {
911
+ readonly name: "owning_table_gone";
912
+ readonly args: "p_organization_id uuid, p_record_id uuid";
913
+ readonly returns: "boolean";
914
+ readonly security: "invoker";
770
915
  }, {
771
916
  readonly name: "parity_field_types";
772
917
  readonly args: "";
@@ -866,17 +1011,17 @@ declare const STORE_DOORS: readonly [{
866
1011
  readonly name: "query_across_homes";
867
1012
  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";
868
1013
  readonly returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)";
869
- readonly security: "invoker";
1014
+ readonly security: "definer";
870
1015
  }, {
871
1016
  readonly name: "query_by_coordinates";
872
1017
  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";
873
1018
  readonly returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)";
874
- readonly security: "invoker";
1019
+ readonly security: "definer";
875
1020
  }, {
876
1021
  readonly name: "query_can_see";
877
1022
  readonly args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text";
878
1023
  readonly returns: "boolean";
879
- readonly security: "invoker";
1024
+ readonly security: "definer";
880
1025
  }, {
881
1026
  readonly name: "query_hot_paths";
882
1027
  readonly args: "";
@@ -906,42 +1051,72 @@ declare const STORE_DOORS: readonly [{
906
1051
  readonly name: "query_record_as_of";
907
1052
  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";
908
1053
  readonly returns: "jsonb";
909
- readonly security: "invoker";
1054
+ readonly security: "definer";
910
1055
  }, {
911
1056
  readonly name: "query_relation_edges";
912
1057
  readonly args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text";
913
1058
  readonly returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)";
914
- readonly security: "invoker";
1059
+ readonly security: "definer";
915
1060
  }, {
916
1061
  readonly name: "query_rollup";
917
1062
  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";
918
1063
  readonly returns: "TABLE(record_id uuid, depth integer)";
919
- readonly security: "invoker";
1064
+ readonly security: "definer";
920
1065
  }, {
921
1066
  readonly name: "query_rollup_sum";
922
1067
  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";
923
1068
  readonly returns: "numeric";
924
- readonly security: "invoker";
1069
+ readonly security: "definer";
925
1070
  }, {
926
1071
  readonly name: "query_table_as_of";
927
1072
  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";
928
1073
  readonly returns: "TABLE(record_id uuid, data jsonb)";
929
- readonly security: "invoker";
1074
+ readonly security: "definer";
930
1075
  }, {
931
1076
  readonly name: "query_table_homes";
932
1077
  readonly args: "p_organization_id uuid, p_table_id uuid";
933
1078
  readonly returns: "SETOF uuid";
934
- readonly security: "invoker";
1079
+ readonly security: "definer";
1080
+ }, {
1081
+ readonly name: "query_visibility_parity";
1082
+ readonly args: "p_organization_id uuid";
1083
+ 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)";
1084
+ readonly security: "definer";
935
1085
  }, {
936
1086
  readonly name: "query_visible_ids";
937
1087
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text";
938
1088
  readonly returns: "SETOF uuid";
939
- readonly security: "invoker";
1089
+ readonly security: "definer";
940
1090
  }, {
941
1091
  readonly name: "reachable_from";
942
1092
  readonly args: "p_organization_id uuid, p_roots uuid[]";
943
1093
  readonly returns: "TABLE(record_id uuid, depth integer, via text)";
944
1094
  readonly security: "invoker";
1095
+ }, {
1096
+ readonly name: "reaches_directly";
1097
+ readonly args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level";
1098
+ readonly returns: "boolean";
1099
+ readonly security: "definer";
1100
+ }, {
1101
+ readonly name: "read_door_carried_ids";
1102
+ readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level, OUT o_ids uuid[], OUT o_containers integer";
1103
+ readonly returns: "record";
1104
+ readonly security: "definer";
1105
+ }, {
1106
+ readonly name: "read_door_granted_ids";
1107
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1108
+ readonly returns: "uuid[]";
1109
+ readonly security: "definer";
1110
+ }, {
1111
+ readonly name: "read_door_ladder_ceiling";
1112
+ readonly args: "";
1113
+ readonly returns: "integer";
1114
+ readonly security: "invoker";
1115
+ }, {
1116
+ readonly name: "read_door_parity";
1117
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer";
1118
+ readonly returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)";
1119
+ readonly security: "definer";
945
1120
  }, {
946
1121
  readonly name: "read_paths_outside_the_door";
947
1122
  readonly args: "";
@@ -961,27 +1136,57 @@ declare const STORE_DOORS: readonly [{
961
1136
  readonly name: "record_aggregate";
962
1137
  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";
963
1138
  readonly returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)";
964
- readonly security: "invoker";
1139
+ readonly security: "definer";
965
1140
  }, {
966
1141
  readonly name: "record_applicability";
967
1142
  readonly args: "p_organization_id uuid, p_record_id uuid";
968
1143
  readonly returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)";
969
1144
  readonly security: "invoker";
1145
+ }, {
1146
+ readonly name: "record_as_of";
1147
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone";
1148
+ readonly returns: "TABLE(state jsonb, replayed boolean)";
1149
+ readonly security: "definer";
1150
+ }, {
1151
+ readonly name: "record_card";
1152
+ readonly args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid";
1153
+ readonly returns: "jsonb";
1154
+ readonly security: "definer";
1155
+ }, {
1156
+ readonly name: "record_carrying_edges";
1157
+ readonly args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone";
1158
+ readonly returns: "TABLE(container_id uuid, item_id uuid, edge_role text)";
1159
+ readonly security: "invoker";
970
1160
  }, {
971
1161
  readonly name: "record_delete";
972
1162
  readonly args: "p_organization_id uuid, p_record_id uuid";
973
1163
  readonly returns: "timestamp with time zone";
974
1164
  readonly security: "definer";
1165
+ }, {
1166
+ readonly name: "record_relation_edges";
1167
+ 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";
1168
+ readonly returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)";
1169
+ readonly security: "invoker";
975
1170
  }, {
976
1171
  readonly name: "record_reparent";
977
1172
  readonly args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid";
978
1173
  readonly returns: "void";
979
- readonly security: "invoker";
1174
+ readonly security: "definer";
1175
+ }, {
1176
+ readonly name: "record_resolve";
1177
+ readonly args: "p_organization_id uuid, p_id uuid";
1178
+ readonly returns: "jsonb";
1179
+ readonly security: "definer";
980
1180
  }, {
981
1181
  readonly name: "record_restore";
982
1182
  readonly args: "p_organization_id uuid, p_record_id uuid";
983
1183
  readonly returns: "void";
984
1184
  readonly security: "definer";
1185
+ }, {
1186
+ readonly name: "record_state_as_of";
1187
+ readonly args: "p_record_id uuid, p_at timestamp with time zone";
1188
+ readonly returns: "TABLE(state jsonb, replayed boolean)";
1189
+ readonly security: "definer";
985
1190
  }, {
986
1191
  readonly name: "record_update";
987
1192
  readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer";
@@ -996,17 +1201,27 @@ declare const STORE_DOORS: readonly [{
996
1201
  readonly name: "record_values_versioned";
997
1202
  readonly args: "p_organization_id uuid, p_record_id uuid";
998
1203
  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)";
999
- readonly security: "invoker";
1204
+ readonly security: "definer";
1000
1205
  }, {
1001
1206
  readonly name: "record_write";
1002
1207
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
1003
1208
  readonly returns: "uuid";
1004
1209
  readonly security: "definer";
1210
+ }, {
1211
+ readonly name: "relation_carry";
1212
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1213
+ readonly returns: "uuid";
1214
+ readonly security: "definer";
1005
1215
  }, {
1006
1216
  readonly name: "relation_own";
1007
1217
  readonly args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid";
1008
1218
  readonly returns: "uuid";
1009
- readonly security: "invoker";
1219
+ readonly security: "definer";
1220
+ }, {
1221
+ readonly name: "relation_target_card";
1222
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text";
1223
+ readonly returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)";
1224
+ readonly security: "definer";
1010
1225
  }, {
1011
1226
  readonly name: "relation_target_external";
1012
1227
  readonly args: "p_connection_token text, p_external_table text, p_external_key text";
@@ -1021,7 +1236,12 @@ declare const STORE_DOORS: readonly [{
1021
1236
  readonly name: "relation_targets";
1022
1237
  readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text";
1023
1238
  readonly returns: "SETOF uuid";
1024
- readonly security: "invoker";
1239
+ readonly security: "definer";
1240
+ }, {
1241
+ readonly name: "relation_uncarry";
1242
+ readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1243
+ readonly returns: "integer";
1244
+ readonly security: "definer";
1025
1245
  }, {
1026
1246
  readonly name: "reopen_declared_doors";
1027
1247
  readonly args: "";
@@ -1122,6 +1342,56 @@ declare const STORE_DOORS: readonly [{
1122
1342
  readonly args: "p_organization_id uuid, p_rule_id uuid";
1123
1343
  readonly returns: "integer";
1124
1344
  readonly security: "invoker";
1345
+ }, {
1346
+ readonly name: "said";
1347
+ readonly args: "p_value text, p_when_there_is_none text";
1348
+ readonly returns: "text";
1349
+ readonly security: "invoker";
1350
+ }, {
1351
+ readonly name: "share_access";
1352
+ readonly args: "p_organization_id uuid, p_subject_id uuid";
1353
+ 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)";
1354
+ readonly security: "definer";
1355
+ }, {
1356
+ readonly name: "share_grant";
1357
+ 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";
1358
+ readonly returns: "jsonb";
1359
+ readonly security: "definer";
1360
+ }, {
1361
+ readonly name: "share_lane_set";
1362
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level";
1363
+ readonly returns: "jsonb";
1364
+ readonly security: "definer";
1365
+ }, {
1366
+ readonly name: "share_lanes";
1367
+ readonly args: "";
1368
+ readonly returns: "TABLE(choice text, lane text, discoverable boolean, label text, means text)";
1369
+ readonly security: "definer";
1370
+ }, {
1371
+ readonly name: "share_levels";
1372
+ readonly args: "";
1373
+ readonly returns: "TABLE(level permission_level, ordinal integer, label text, means text)";
1374
+ readonly security: "definer";
1375
+ }, {
1376
+ readonly name: "share_people";
1377
+ readonly args: "p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25";
1378
+ readonly returns: "TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)";
1379
+ readonly security: "definer";
1380
+ }, {
1381
+ readonly name: "share_revoke";
1382
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid";
1383
+ readonly returns: "jsonb";
1384
+ readonly security: "definer";
1385
+ }, {
1386
+ readonly name: "share_subject_name";
1387
+ readonly args: "p_organization_id uuid, p_type text, p_id uuid";
1388
+ readonly returns: "text";
1389
+ readonly security: "definer";
1390
+ }, {
1391
+ readonly name: "shared_only_disagreements";
1392
+ readonly args: "p_pretend text DEFAULT NULL::text";
1393
+ readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, record_id uuid, table_id uuid, ladder boolean, read_door boolean, rls_mirror boolean, why text)";
1394
+ readonly security: "invoker";
1125
1395
  }, {
1126
1396
  readonly name: "size_refusal";
1127
1397
  readonly args: "p_organization_id uuid, p_data jsonb";
@@ -1157,11 +1427,26 @@ declare const STORE_DOORS: readonly [{
1157
1427
  readonly args: "p_organization_id uuid, p_table_id uuid";
1158
1428
  readonly returns: "jsonb";
1159
1429
  readonly security: "definer";
1430
+ }, {
1431
+ readonly name: "table_contents";
1432
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1433
+ readonly returns: "TABLE(record_id uuid, kind text, goes_at integer)";
1434
+ readonly security: "invoker";
1160
1435
  }, {
1161
1436
  readonly name: "table_declare";
1162
1437
  readonly args: "p_organization_id uuid, p_spec jsonb";
1163
1438
  readonly returns: "uuid";
1164
1439
  readonly security: "definer";
1440
+ }, {
1441
+ readonly name: "table_has_a_visible_record";
1442
+ readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid";
1443
+ readonly returns: "boolean";
1444
+ readonly security: "definer";
1445
+ }, {
1446
+ readonly name: "table_is_live";
1447
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1448
+ readonly returns: "boolean";
1449
+ readonly security: "invoker";
1165
1450
  }, {
1166
1451
  readonly name: "table_kernel_id";
1167
1452
  readonly args: "";
@@ -1191,11 +1476,16 @@ declare const STORE_DOORS: readonly [{
1191
1476
  readonly name: "table_type_field";
1192
1477
  readonly args: "p_organization_id uuid, p_table_id uuid";
1193
1478
  readonly returns: "text";
1194
- readonly security: "invoker";
1479
+ readonly security: "definer";
1195
1480
  }, {
1196
1481
  readonly name: "tables_at_home";
1197
1482
  readonly args: "p_organization_id uuid, p_home_ids uuid[]";
1198
1483
  readonly returns: "TABLE(table_id uuid, home_record_id uuid, kind text)";
1484
+ readonly security: "definer";
1485
+ }, {
1486
+ readonly name: "tables_described_without_asking";
1487
+ readonly args: "";
1488
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
1199
1489
  readonly security: "invoker";
1200
1490
  }, {
1201
1491
  readonly name: "trg_associations_bump_visibility";
@@ -1241,7 +1531,7 @@ declare const STORE_DOORS: readonly [{
1241
1531
  readonly name: "value_read";
1242
1532
  readonly args: "p_organization_id uuid, p_record_id uuid, p_key text";
1243
1533
  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)";
1244
- readonly security: "invoker";
1534
+ readonly security: "definer";
1245
1535
  }, {
1246
1536
  readonly name: "value_versions";
1247
1537
  readonly args: "p_old jsonb, p_new jsonb";
@@ -1252,6 +1542,11 @@ declare const STORE_DOORS: readonly [{
1252
1542
  readonly args: "p_item_type text, p_item_id uuid";
1253
1543
  readonly returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)";
1254
1544
  readonly security: "definer";
1545
+ }, {
1546
+ readonly name: "visibility_as_of";
1547
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone";
1548
+ 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)";
1549
+ readonly security: "definer";
1255
1550
  }, {
1256
1551
  readonly name: "visibility_cache_rebuild";
1257
1552
  readonly args: "";
@@ -1267,11 +1562,21 @@ declare const STORE_DOORS: readonly [{
1267
1562
  readonly args: "p_container_type text, p_container_id uuid";
1268
1563
  readonly returns: "integer";
1269
1564
  readonly security: "definer";
1565
+ }, {
1566
+ readonly name: "visible_predicate_sql";
1567
+ readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text";
1568
+ readonly returns: "text";
1569
+ readonly security: "definer";
1270
1570
  }, {
1271
1571
  readonly name: "visible_record_ids";
1272
1572
  readonly args: "p_user_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level";
1273
1573
  readonly returns: "TABLE(id uuid)";
1274
1574
  readonly security: "definer";
1575
+ }, {
1576
+ readonly name: "visible_set";
1577
+ readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text";
1578
+ readonly returns: "record";
1579
+ readonly security: "definer";
1275
1580
  }, {
1276
1581
  readonly name: "widget_kernel_id";
1277
1582
  readonly args: "";
@@ -1371,15 +1676,15 @@ declare const STORE_DOORS: readonly [{
1371
1676
  /** The campaign's own knobs, with the value the store resolves them to today. */
1372
1677
  declare const STORE_KNOBS: readonly [{
1373
1678
  readonly key: "accessible_entity_ids_guard";
1374
- readonly value: "false";
1679
+ readonly value: "true";
1375
1680
  readonly type: "boolean";
1376
1681
  }, {
1377
1682
  readonly key: "agent_schema_changes";
1378
- readonly value: "\"propose\"";
1683
+ readonly value: "\"ask\"";
1379
1684
  readonly type: "string";
1380
1685
  }, {
1381
1686
  readonly key: "associations_guard";
1382
- readonly value: "false";
1687
+ readonly value: "true";
1383
1688
  readonly type: "boolean";
1384
1689
  }, {
1385
1690
  readonly key: "code_paths_enabled";
@@ -1421,6 +1726,10 @@ declare const STORE_KNOBS: readonly [{
1421
1726
  readonly key: "containment_depth_ceiling";
1422
1727
  readonly value: "16";
1423
1728
  readonly type: "integer";
1729
+ }, {
1730
+ readonly key: "cross_organization_links";
1731
+ readonly value: "false";
1732
+ readonly type: "boolean";
1424
1733
  }, {
1425
1734
  readonly key: "document_max_bytes";
1426
1735
  readonly value: "1048576";
@@ -1456,7 +1765,15 @@ declare const STORE_KNOBS: readonly [{
1456
1765
  }, {
1457
1766
  readonly key: "member_default_level";
1458
1767
  readonly value: "\"viewer\"";
1459
- readonly type: "string";
1768
+ readonly type: "enum";
1769
+ }, {
1770
+ readonly key: "member_default_visibility";
1771
+ readonly value: "\"all_records\"";
1772
+ readonly type: "enum";
1773
+ }, {
1774
+ readonly key: "records_tool_default";
1775
+ readonly value: "true";
1776
+ readonly type: "boolean";
1460
1777
  }, {
1461
1778
  readonly key: "row_versions_guard";
1462
1779
  readonly value: "false";
@@ -1506,43 +1823,46 @@ declare const STORE_KNOBS: readonly [{
1506
1823
  */
1507
1824
  declare const STORE_REFUSAL_CODES: readonly [{
1508
1825
  readonly code: "02000";
1509
- 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";
1826
+ 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";
1510
1827
  }, {
1511
1828
  readonly code: "0A000";
1512
1829
  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";
1513
1830
  }, {
1514
1831
  readonly code: "22004";
1515
- 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";
1832
+ 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";
1516
1833
  }, {
1517
1834
  readonly code: "22012";
1518
1835
  readonly raised_by: "rule_eval";
1519
1836
  }, {
1520
1837
  readonly code: "22023";
1521
- 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";
1838
+ 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,my_levels,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";
1522
1839
  }, {
1523
1840
  readonly code: "23503";
1524
- 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";
1841
+ 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";
1525
1842
  }, {
1526
1843
  readonly code: "23505";
1527
- readonly raised_by: "doc_sign,doc_signature_write,home_add,io_proposal_accept,work_slot_hold";
1844
+ readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_slot_hold";
1528
1845
  }, {
1529
1846
  readonly code: "23514";
1530
- 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";
1847
+ 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,_resolve_choice_words,_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";
1531
1848
  }, {
1532
1849
  readonly code: "40001";
1533
1850
  readonly raised_by: "has_visibility_at";
1534
1851
  }, {
1535
1852
  readonly code: "42501";
1536
- 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";
1853
+ 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_may_know_table,assert_organization_admin,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,my_levels,promote_table,query_visibility_parity,read_record,read_records,share_grant,visibility_as_of";
1537
1854
  }, {
1538
1855
  readonly code: "53400";
1539
- readonly raised_by: "anon_rate_take,promote_field";
1856
+ readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
1857
+ }, {
1858
+ readonly code: "54001";
1859
+ readonly raised_by: "record_delete";
1540
1860
  }, {
1541
1861
  readonly code: "PT409";
1542
1862
  readonly raised_by: "record_update";
1543
1863
  }];
1544
1864
  /** `platform.entity_types` — the registered tokens a Table or relation may name. */
1545
- 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"];
1865
+ 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"];
1546
1866
  type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number]["code"];
1547
1867
  type StoreDoorName = (typeof STORE_DOORS)[number]["name"];
1548
1868
  type EntityToken = (typeof ENTITY_TOKENS)[number];
@@ -1831,6 +2151,27 @@ interface RecordRead {
1831
2151
  }>;
1832
2152
  }
1833
2153
 
2154
+ /** `public.permission_level`, in the store's own order. */
2155
+ type PermissionLevel = "viewer" | "commenter" | "editor" | "admin";
2156
+ /** The order the store writes them in, lowest first. */
2157
+ declare const PERMISSION_LEVELS: readonly PermissionLevel[];
2158
+ /** Whether `held` is the same rung as `needed` or a higher one. Nothing held is never enough. */
2159
+ declare function atLeast(held: PermissionLevel | null | undefined, needed: PermissionLevel): boolean;
2160
+ /** A level word the store sent, or null when it sent something this package does not know. */
2161
+ declare function asPermissionLevel(word: unknown): PermissionLevel | null;
2162
+ /** The higher of two levels — what a person holds when two ways in both let them through. */
2163
+ declare function highestLevel(left: PermissionLevel | null | undefined, right: PermissionLevel | null | undefined): PermissionLevel | null;
2164
+ /**
2165
+ * What one subject's level is, as `custom.my_levels` answers it. `null` is an
2166
+ * ANSWER — "you hold nothing on this" — and never a missing row: a screen that
2167
+ * could not tell "no access" from "not asked yet" would draw one of them as the
2168
+ * other.
2169
+ */
2170
+ interface MyLevel {
2171
+ id: string;
2172
+ level: PermissionLevel | null;
2173
+ }
2174
+
1834
2175
  /**
1835
2176
  * REC-1. A Table declares its fields, exactly one Home, and the properties
1836
2177
  * `display`, `ordered`, `heavy` | `light`, `retention` and `detail`.
@@ -2011,6 +2352,69 @@ interface TableProposal {
2011
2352
  fields: Array<Omit<FieldProposal, "table_id" | "because">>;
2012
2353
  because: string;
2013
2354
  }
2355
+ /**
2356
+ * WHAT A PERSON SAYS WHEN THEY ADD A COLUMN — the argument of
2357
+ * `custom.field_declare`, and deliberately NOT a `Field`.
2358
+ *
2359
+ * A `Field` is what the store STORES: a behaviour from a closed set of five,
2360
+ * modifiers beside it, a format, a unit, a relation target, a relation maximum,
2361
+ * an on-delete word, a compute_on, and the attached Rules that make a format
2362
+ * enforceable. A person adding a column knows none of that. They know they want
2363
+ * a date, or a person, or a list with these three choices in it.
2364
+ *
2365
+ * Every client that tried to bridge that gap itself got it wrong — the field
2366
+ * panel picked "Person" and the store read a Formula — so the bridge is the
2367
+ * STORE's, once, and this is the shape it takes.
2368
+ */
2369
+ interface NewFieldDeclaration {
2370
+ /** What a person reads on the column. The only thing that is always required. */
2371
+ label: string;
2372
+ /** One of the thirteen. Absent means one of the three plain behaviours below. */
2373
+ parity_type?: ParityFieldType;
2374
+ /** Plain text, a long text or a plain number — the three that carry no parity type. */
2375
+ plain?: "text" | "long_text" | "number";
2376
+ /** Derived from the label when absent, which is why the panel never asks for it. */
2377
+ key?: string;
2378
+ required?: boolean;
2379
+ multi?: boolean;
2380
+ dated?: boolean;
2381
+ sort?: number;
2382
+ sensitivity?: FieldSensitivity;
2383
+ context_policy?: ContextPolicy;
2384
+ rules?: FieldRule[];
2385
+ /** A choice list's choices, as words. The store keeps them as a Table (FLD-5 / FLD-6). */
2386
+ options?: string[];
2387
+ /** …or the Table they already come from, when a person picked an existing list. */
2388
+ options_table_id?: Uuid;
2389
+ /** The currency symbol or code a currency field's numbers are in (FLD-N-1). */
2390
+ unit?: string;
2391
+ /** A date field: a day, or a day and a time. */
2392
+ kind?: "date" | "datetime";
2393
+ /** A lookup or a rollup: the key of the relation Field on THIS table it travels along. */
2394
+ via?: string;
2395
+ /** A lookup: the key of the value it reads on the far side. */
2396
+ pick?: string;
2397
+ /** A rollup: what it works out, and of which far-side field (`count` needs none). */
2398
+ agg?: "sum" | "count" | "min" | "max" | "avg";
2399
+ of?: string;
2400
+ /** A formula: the expression, in the same shape a Rule uses (REC-15). */
2401
+ expr?: Record<string, unknown>;
2402
+ compute_on?: ComputeOn;
2403
+ relation_max?: number;
2404
+ }
2405
+ /** What `custom.field_update` accepts: a field's settings, never what it holds. */
2406
+ interface FieldPatch {
2407
+ label?: string;
2408
+ required?: boolean;
2409
+ dated?: boolean;
2410
+ sort?: number;
2411
+ sensitivity?: FieldSensitivity;
2412
+ context_policy?: ContextPolicy;
2413
+ unit?: string;
2414
+ rules?: FieldRule[];
2415
+ /** The choices of a choice list, rewritten. A choice still wanted keeps its id. */
2416
+ options?: string[];
2417
+ }
2014
2418
 
2015
2419
  /**
2016
2420
  * A rule expression as `custom.rule_eval` ACTUALLY evaluates it — read off the
@@ -2918,6 +3322,33 @@ interface RecordsClient {
2918
3322
  spec: Record<string, unknown>;
2919
3323
  homeId: Uuid;
2920
3324
  }): Promise<RecordsResult<Uuid>>;
3325
+ /**
3326
+ * ADD A FIELD TO A TABLE. One call, and the store does the three things no
3327
+ * client can do for itself: it turns a parity type into the behaviour,
3328
+ * modifiers, format, unit, relation target and Rules its own guards demand;
3329
+ * it tells the TABLE about the field (REC-1 / FLD-8 — a definition for a
3330
+ * field the table never declared is refused, which is the sentence every
3331
+ * "Add field" used to end on); and it stores the definition as a FIELD
3332
+ * rather than as a plain record, so the delete rules and the
3333
+ * formula-dependency check can see it.
3334
+ *
3335
+ * A choice list carries its `options` as words. The store keeps them the only
3336
+ * way FLD-5 / FLD-6 allows — as the records of a Table it declares for them —
3337
+ * so nobody is made to build a table before they can have a dropdown.
3338
+ */
3339
+ fieldDeclare(args: {
3340
+ table_id: Uuid;
3341
+ spec: NewFieldDeclaration;
3342
+ }): Promise<RecordsResult<Uuid>>;
3343
+ /** One field's own settings. What it HOLDS is a conversion and is refused here by name. */
3344
+ fieldUpdate(args: {
3345
+ field_id: Uuid;
3346
+ patch: FieldPatch;
3347
+ }): Promise<RecordsResult<Uuid>>;
3348
+ /** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
3349
+ fieldRetire(args: {
3350
+ field_id: Uuid;
3351
+ }): Promise<RecordsResult<boolean>>;
2921
3352
  /** The kernel Tables a caller writes a Home, a Field or a Rule into. */
2922
3353
  personKernelId(): Promise<RecordsResult<Uuid>>;
2923
3354
  fieldKernelId(): Promise<RecordsResult<Uuid>>;
@@ -3237,6 +3668,19 @@ interface RecordsClient {
3237
3668
  }): Promise<RecordsResult<unknown>>;
3238
3669
  /** Is the store switched on for this organization? A product switch, never the boundary. */
3239
3670
  storeIsOpen(): Promise<RecordsResult<boolean>>;
3671
+ /**
3672
+ * WHAT THIS PERSON MAY DO TO THESE THINGS — asked once, for a whole page.
3673
+ *
3674
+ * There is no principal argument, on purpose: the door resolves the caller
3675
+ * from the session, so a person can ask about their OWN access and about
3676
+ * nobody else's. A subject they hold nothing on answers `level: null`, which
3677
+ * is an answer; the row is never omitted, because a screen that could not
3678
+ * tell "no access" from "not asked yet" would draw one of them as the other.
3679
+ */
3680
+ myLevels(args: {
3681
+ ids: Uuid[];
3682
+ subject?: "record";
3683
+ }): Promise<RecordsResult<MyLevel[]>>;
3240
3684
  }
3241
3685
 
3242
3686
  interface RecordsProviderProps {
@@ -3263,6 +3707,21 @@ interface Async<T> {
3263
3707
  declare function useTable(tableId: Uuid | null): Async<Table | null>;
3264
3708
  /** Every Table this person can see in this organization. */
3265
3709
  declare function useTables(): Async<Table[]>;
3710
+ /**
3711
+ * WHAT THIS PERSON MAY DO TO THESE THINGS — one call for a whole page.
3712
+ *
3713
+ * A screen asks this BEFORE it draws a control, which is the whole difference
3714
+ * between a product that offers what you may use and one that offers everything
3715
+ * and apologises afterwards. The ids are joined into the dependency key so a
3716
+ * page that re-renders with the same rows does not re-ask.
3717
+ *
3718
+ * `null` for a subject is an ANSWER ("you hold nothing on this"), and `loading`
3719
+ * is a third state that is neither — a caller that treated loading as "no"
3720
+ * would blink every control off on every reload.
3721
+ */
3722
+ declare function useMyLevels(ids: Uuid[]): Async<Record<string, PermissionLevel | null>>;
3723
+ /** The same question about one thing. */
3724
+ declare function useMyLevel(id: Uuid | null): Async<PermissionLevel | null>;
3266
3725
  /**
3267
3726
  * FLD-10. The Fields that APPLY — the store decides, from the record type, and
3268
3727
  * the client asks rather than filtering a list it has.
@@ -3316,6 +3775,37 @@ interface UseRecordMutation {
3316
3775
  }
3317
3776
  /** Writes, with optimistic concurrency surfaced instead of swallowed. */
3318
3777
  declare function useRecordMutation(): UseRecordMutation;
3778
+ interface UseFieldMutation {
3779
+ /** Add a column. One call; the store decides what the parity type is made of. */
3780
+ declare: (args: {
3781
+ table_id: Uuid;
3782
+ spec: NewFieldDeclaration;
3783
+ }) => Promise<Uuid | null>;
3784
+ /** One field's own settings. What it HOLDS is a conversion and is refused by name. */
3785
+ update: (args: {
3786
+ field_id: Uuid;
3787
+ patch: FieldPatch;
3788
+ }) => Promise<Uuid | null>;
3789
+ /** Take a column off a table. */
3790
+ retire: (args: {
3791
+ field_id: Uuid;
3792
+ }) => Promise<boolean>;
3793
+ saving: boolean;
3794
+ error: RecordsError | null;
3795
+ clearError: () => void;
3796
+ }
3797
+ /**
3798
+ * THE SHAPE OF A TABLE, changed through the store's own doors.
3799
+ *
3800
+ * Deliberately separate from `useRecordMutation`. A Field IS a record, but
3801
+ * adding one is not writing a record: it changes what every record of the table
3802
+ * means, it is an administrator's right rather than an editor's, and it is the
3803
+ * one write `custom.record_write` was never able to make — it cannot tell the
3804
+ * Table about the field, and the field guard refuses any definition the Table
3805
+ * has not declared. A screen that reached for the record writer here is the
3806
+ * screen that spent 19 September refusing every column a person tried to add.
3807
+ */
3808
+ declare function useFieldMutation(): UseFieldMutation;
3319
3809
  /**
3320
3810
  * DYN-14 / AGT-N-7. A merge field's value — and while the resolver's server half
3321
3811
  * does not exist, `pending` WITH THE REASON. Never a blank, never a leftover
@@ -3323,4 +3813,4 @@ declare function useRecordMutation(): UseRecordMutation;
3323
3813
  */
3324
3814
  declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
3325
3815
 
3326
- 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, RecordsProvider, type RecordsProviderProps, 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 UseRecordMutation, type UseRecordsOptions, type UseRecordsState, 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, useFields, useMergeField, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
3816
+ 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 MyLevel, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, 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, RecordsProvider, type RecordsProviderProps, 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 UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, 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, asPermissionLevel, atLeast, err, highestLevel, isRecordsErr, measureKey, ok, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };