@ai-matrx/records 0.11.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -382,11 +382,96 @@ declare const STORE_DOORS: readonly [{
382
382
  readonly args: "p_item_type text, p_item_id uuid";
383
383
  readonly returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)";
384
384
  readonly security: "definer";
385
+ }, {
386
+ readonly name: "choice_census";
387
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
388
+ readonly returns: "jsonb";
389
+ readonly security: "definer";
390
+ }, {
391
+ readonly name: "choice_field_map";
392
+ readonly args: "p_organization_id uuid, p_table_id uuid";
393
+ readonly returns: "jsonb";
394
+ readonly security: "invoker";
395
+ }, {
396
+ readonly name: "choice_filter_normalize";
397
+ readonly args: "p_map jsonb, p_filter jsonb";
398
+ readonly returns: "jsonb";
399
+ readonly security: "invoker";
400
+ }, {
401
+ readonly name: "choice_key_for";
402
+ readonly args: "p_organization_id uuid, p_options_table_id uuid, p_title text, p_exclude uuid DEFAULT NULL::uuid";
403
+ readonly returns: "text";
404
+ readonly security: "invoker";
405
+ }, {
406
+ readonly name: "choice_key_of";
407
+ readonly args: "p_field jsonb, p_token text";
408
+ readonly returns: "text";
409
+ readonly security: "invoker";
410
+ }, {
411
+ readonly name: "choice_options";
412
+ readonly args: "p_organization_id uuid, p_options_table_id uuid";
413
+ readonly returns: "jsonb";
414
+ readonly security: "invoker";
415
+ }, {
416
+ readonly name: "choice_render";
417
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb";
418
+ readonly returns: "jsonb";
419
+ readonly security: "invoker";
420
+ }, {
421
+ readonly name: "choice_render_groups";
422
+ readonly args: "p_map jsonb, p_groups jsonb";
423
+ readonly returns: "jsonb";
424
+ readonly security: "invoker";
425
+ }, {
426
+ readonly name: "choice_render_note";
427
+ readonly args: "p_field jsonb, p_value jsonb";
428
+ readonly returns: "jsonb";
429
+ readonly security: "invoker";
430
+ }, {
431
+ readonly name: "choice_render_value";
432
+ readonly args: "p_field jsonb, p_value jsonb";
433
+ readonly returns: "jsonb";
434
+ readonly security: "invoker";
435
+ }, {
436
+ readonly name: "choice_slug";
437
+ readonly args: "p_word text";
438
+ readonly returns: "text";
439
+ readonly security: "invoker";
440
+ }, {
441
+ readonly name: "choice_synonyms";
442
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_token text";
443
+ readonly returns: "text[]";
444
+ readonly security: "invoker";
445
+ }, {
446
+ readonly name: "choice_synonyms_in";
447
+ readonly args: "p_map jsonb, p_token text";
448
+ readonly returns: "text[]";
449
+ readonly security: "invoker";
450
+ }, {
451
+ readonly name: "choice_words";
452
+ readonly args: "p_field jsonb";
453
+ readonly returns: "text";
454
+ readonly security: "invoker";
385
455
  }, {
386
456
  readonly name: "client_write_grants";
387
457
  readonly args: "";
388
458
  readonly returns: "TABLE(role_name text, object_name text, privilege text)";
389
459
  readonly security: "invoker";
460
+ }, {
461
+ readonly name: "comment_mention_deliver";
462
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_table_id uuid, p_comment_id uuid, p_recipient uuid, p_author_name text, p_record_title text, p_body text";
463
+ readonly returns: "uuid";
464
+ readonly security: "definer";
465
+ }, {
466
+ readonly name: "comment_thread";
467
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false";
468
+ readonly returns: "jsonb";
469
+ readonly security: "definer";
470
+ }, {
471
+ readonly name: "comment_write";
472
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid, p_mentions uuid[] DEFAULT NULL::uuid[]";
473
+ readonly returns: "jsonb";
474
+ readonly security: "definer";
390
475
  }, {
391
476
  readonly name: "computed_provenance";
392
477
  readonly args: "p_organization_id uuid, p_record_id uuid";
@@ -422,6 +507,61 @@ declare const STORE_DOORS: readonly [{
422
507
  readonly args: "";
423
508
  readonly returns: "TABLE(token text, schema_name text, table_name text)";
424
509
  readonly security: "invoker";
510
+ }, {
511
+ readonly name: "dashboard_block_normalize";
512
+ readonly args: "p_organization_id uuid, p_subject_table_id uuid, p_block jsonb";
513
+ readonly returns: "jsonb";
514
+ readonly security: "definer";
515
+ }, {
516
+ readonly name: "dashboard_class";
517
+ readonly args: "";
518
+ readonly returns: "text";
519
+ readonly security: "invoker";
520
+ }, {
521
+ readonly name: "dashboard_declare";
522
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_name text, p_blocks jsonb DEFAULT '[]'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_dashboard_id uuid DEFAULT NULL::uuid";
523
+ readonly returns: "uuid";
524
+ readonly security: "definer";
525
+ }, {
526
+ readonly name: "dashboard_delete";
527
+ readonly args: "p_organization_id uuid, p_dashboard_id uuid";
528
+ readonly returns: "boolean";
529
+ readonly security: "definer";
530
+ }, {
531
+ readonly name: "dashboard_field_keys";
532
+ readonly args: "p_organization_id uuid, p_table_id uuid";
533
+ readonly returns: "text[]";
534
+ readonly security: "definer";
535
+ }, {
536
+ readonly name: "dashboard_kinds";
537
+ readonly args: "";
538
+ readonly returns: "text[]";
539
+ readonly security: "invoker";
540
+ }, {
541
+ readonly name: "dashboard_moment_sql";
542
+ readonly args: "p_key text";
543
+ readonly returns: "text";
544
+ readonly security: "invoker";
545
+ }, {
546
+ readonly name: "dashboard_run";
547
+ readonly args: "p_organization_id uuid, p_dashboard_id uuid, p_filter jsonb DEFAULT '{}'::jsonb";
548
+ readonly returns: "jsonb";
549
+ readonly security: "definer";
550
+ }, {
551
+ readonly name: "dashboard_stuck";
552
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_state_key text, p_days integer DEFAULT 14, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 50, p_required text DEFAULT 'viewer'::text";
553
+ readonly returns: "TABLE(record_id uuid, title text, state text, last_changed_at timestamp with time zone, days_unchanged numeric, measured_from text)";
554
+ readonly security: "definer";
555
+ }, {
556
+ readonly name: "dashboard_window_sql";
557
+ readonly args: "p_key text, p_window jsonb";
558
+ readonly returns: "text";
559
+ readonly security: "invoker";
560
+ }, {
561
+ readonly name: "dashboards";
562
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
563
+ readonly returns: "TABLE(dashboard_id uuid, table_id uuid, name text, blocks jsonb, presentation jsonb, block_count integer, version integer, created_at timestamp with time zone, updated_at timestamp with time zone)";
564
+ readonly security: "definer";
425
565
  }, {
426
566
  readonly name: "delete_cascade_closure";
427
567
  readonly args: "p_organization_id uuid, p_record_id uuid";
@@ -492,6 +632,11 @@ declare const STORE_DOORS: readonly [{
492
632
  readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid, p_table_id uuid, p_template_version integer, p_body text, p_content_hash text";
493
633
  readonly returns: "uuid";
494
634
  readonly security: "definer";
635
+ }, {
636
+ readonly name: "doc_renders";
637
+ readonly args: "p_organization_id uuid, p_record_id uuid";
638
+ readonly returns: "TABLE(render_id uuid, template_id uuid, record_id uuid, table_id uuid, template_version integer, body text, content_hash text, rendered_at timestamp with time zone)";
639
+ readonly security: "definer";
495
640
  }, {
496
641
  readonly name: "doc_sign";
497
642
  readonly args: "p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid DEFAULT NULL::uuid";
@@ -517,6 +662,16 @@ declare const STORE_DOORS: readonly [{
517
662
  readonly args: "p_organization_id uuid, p_render_id uuid, p_record_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid, p_document_hash text, p_document_version integer";
518
663
  readonly returns: "uuid";
519
664
  readonly security: "definer";
665
+ }, {
666
+ readonly name: "doc_signatures";
667
+ readonly args: "p_organization_id uuid, p_record_id uuid";
668
+ readonly returns: "TABLE(signature_id uuid, render_id uuid, record_id uuid, field_key text, signer_name text, signer_user_id uuid, signed_at timestamp with time zone, document_hash text, document_version integer)";
669
+ readonly security: "definer";
670
+ }, {
671
+ readonly name: "doc_template_delete";
672
+ readonly args: "p_organization_id uuid, p_template_id uuid";
673
+ readonly returns: "boolean";
674
+ readonly security: "definer";
520
675
  }, {
521
676
  readonly name: "doc_template_read";
522
677
  readonly args: "p_organization_id uuid, p_template_id uuid";
@@ -527,6 +682,11 @@ declare const STORE_DOORS: readonly [{
527
682
  readonly args: "p_organization_id uuid, p_table_id uuid, p_name text, p_body text, p_template_id uuid DEFAULT NULL::uuid";
528
683
  readonly returns: "uuid";
529
684
  readonly security: "definer";
685
+ }, {
686
+ readonly name: "doc_templates";
687
+ readonly args: "p_organization_id uuid, p_table_id uuid";
688
+ readonly returns: "TABLE(template_id uuid, renders_table_id uuid, name text, body text, template_version integer, token_count bigint, updated_at timestamp with time zone)";
689
+ readonly security: "definer";
530
690
  }, {
531
691
  readonly name: "doc_token_pattern";
532
692
  readonly args: "";
@@ -667,6 +827,11 @@ declare const STORE_DOORS: readonly [{
667
827
  readonly args: "p_organization_id uuid, p_field_id uuid";
668
828
  readonly returns: "TABLE(kind text, dependant_id uuid, label text, how text)";
669
829
  readonly security: "definer";
830
+ }, {
831
+ readonly name: "field_history";
832
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_record_id uuid DEFAULT NULL::uuid";
833
+ readonly returns: "TABLE(record_id uuid, record_title text, version integer, occurred_at timestamp with time zone, operation_label text, actor jsonb, before jsonb, after jsonb)";
834
+ readonly security: "definer";
670
835
  }, {
671
836
  readonly name: "field_kernel_id";
672
837
  readonly args: "";
@@ -757,11 +922,31 @@ declare const STORE_DOORS: readonly [{
757
922
  readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text";
758
923
  readonly returns: "jsonb";
759
924
  readonly security: "invoker";
925
+ }, {
926
+ readonly name: "history_actor";
927
+ readonly args: "p_tier text, p_document jsonb, p_actor_id uuid, p_people jsonb";
928
+ readonly returns: "jsonb";
929
+ readonly security: "invoker";
930
+ }, {
931
+ readonly name: "history_changes";
932
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb";
933
+ readonly returns: "jsonb";
934
+ readonly security: "invoker";
935
+ }, {
936
+ readonly name: "history_people";
937
+ readonly args: "p_organization_id uuid, p_ids uuid[]";
938
+ readonly returns: "jsonb";
939
+ readonly security: "definer";
760
940
  }, {
761
941
  readonly name: "history_prune";
762
942
  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";
763
943
  readonly returns: "jsonb";
764
944
  readonly security: "definer";
945
+ }, {
946
+ readonly name: "history_restore_body";
947
+ readonly args: "p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text";
948
+ readonly returns: "jsonb";
949
+ readonly security: "invoker";
765
950
  }, {
766
951
  readonly name: "history_retention";
767
952
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
@@ -902,6 +1087,16 @@ declare const STORE_DOORS: readonly [{
902
1087
  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";
903
1088
  readonly returns: "boolean";
904
1089
  readonly security: "invoker";
1090
+ }, {
1091
+ readonly name: "list_door_disagreements";
1092
+ readonly args: "p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200";
1093
+ readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)";
1094
+ readonly security: "invoker";
1095
+ }, {
1096
+ readonly name: "list_door_disagreements";
1097
+ readonly args: "p_pretend text, p_only_organization uuid, p_sample integer, p_exhaustive boolean";
1098
+ readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)";
1099
+ readonly security: "invoker";
905
1100
  }, {
906
1101
  readonly name: "lookup_value";
907
1102
  readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb";
@@ -922,6 +1117,11 @@ declare const STORE_DOORS: readonly [{
922
1117
  readonly args: "";
923
1118
  readonly returns: "uuid";
924
1119
  readonly security: "invoker";
1120
+ }, {
1121
+ readonly name: "migrate_choice_keys";
1122
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_dry_run boolean DEFAULT false";
1123
+ readonly returns: "jsonb";
1124
+ readonly security: "definer";
925
1125
  }, {
926
1126
  readonly name: "migrate_delete";
927
1127
  readonly args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text";
@@ -952,6 +1152,11 @@ declare const STORE_DOORS: readonly [{
952
1152
  readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
953
1153
  readonly returns: "jsonb";
954
1154
  readonly security: "definer";
1155
+ }, {
1156
+ readonly name: "migrate_reclass";
1157
+ readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text";
1158
+ readonly returns: "jsonb";
1159
+ readonly security: "definer";
955
1160
  }, {
956
1161
  readonly name: "migrate_rename";
957
1162
  readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text";
@@ -1047,6 +1252,76 @@ declare const STORE_DOORS: readonly [{
1047
1252
  readonly args: "";
1048
1253
  readonly returns: "uuid";
1049
1254
  readonly security: "invoker";
1255
+ }, {
1256
+ readonly name: "portal_admits";
1257
+ readonly args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid";
1258
+ readonly returns: "boolean";
1259
+ readonly security: "definer";
1260
+ }, {
1261
+ readonly name: "portal_card";
1262
+ readonly args: "p_organization_id uuid, p_portal_id uuid";
1263
+ readonly returns: "jsonb";
1264
+ readonly security: "definer";
1265
+ }, {
1266
+ readonly name: "portal_declare";
1267
+ readonly args: "p_organization_id uuid, p_title text, p_client_table_id uuid, p_tables jsonb, p_portal_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_sign_in_method text DEFAULT 'magic_link'::text";
1268
+ readonly returns: "uuid";
1269
+ readonly security: "definer";
1270
+ }, {
1271
+ readonly name: "portal_field_map";
1272
+ readonly args: "p_organization_id uuid, p_table_id uuid";
1273
+ readonly returns: "TABLE(field_id uuid, field_key text, field_type text, points_at uuid)";
1274
+ readonly security: "definer";
1275
+ }, {
1276
+ readonly name: "portal_invitation";
1277
+ readonly args: "p_slug text, p_email text";
1278
+ readonly returns: "jsonb";
1279
+ readonly security: "definer";
1280
+ }, {
1281
+ readonly name: "portal_invite";
1282
+ readonly args: "p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid";
1283
+ readonly returns: "jsonb";
1284
+ readonly security: "definer";
1285
+ }, {
1286
+ readonly name: "portal_me";
1287
+ readonly args: "";
1288
+ readonly returns: "jsonb";
1289
+ readonly security: "definer";
1290
+ }, {
1291
+ readonly name: "portal_preview";
1292
+ readonly args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid";
1293
+ readonly returns: "TABLE(record_id uuid, title text)";
1294
+ readonly security: "definer";
1295
+ }, {
1296
+ readonly name: "portal_principal_bind";
1297
+ readonly args: "p_organization_id uuid, p_principal_id uuid, p_user_id uuid";
1298
+ readonly returns: "jsonb";
1299
+ readonly security: "definer";
1300
+ }, {
1301
+ readonly name: "portal_public";
1302
+ readonly args: "p_slug text";
1303
+ readonly returns: "jsonb";
1304
+ readonly security: "definer";
1305
+ }, {
1306
+ readonly name: "portal_record_title";
1307
+ readonly args: "p_organization_id uuid, p_record_id uuid";
1308
+ readonly returns: "text";
1309
+ readonly security: "definer";
1310
+ }, {
1311
+ readonly name: "portal_revoke";
1312
+ readonly args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid";
1313
+ readonly returns: "jsonb";
1314
+ readonly security: "definer";
1315
+ }, {
1316
+ readonly name: "portal_slug";
1317
+ readonly args: "p_organization_id uuid, p_title text, p_portal_id uuid DEFAULT NULL::uuid";
1318
+ readonly returns: "text";
1319
+ readonly security: "definer";
1320
+ }, {
1321
+ readonly name: "portals";
1322
+ readonly args: "p_organization_id uuid";
1323
+ readonly returns: "TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)";
1324
+ readonly security: "definer";
1050
1325
  }, {
1051
1326
  readonly name: "presentation_kernel_id";
1052
1327
  readonly args: "";
@@ -1272,6 +1547,11 @@ declare const STORE_DOORS: readonly [{
1272
1547
  readonly args: "p_organization_id uuid, p_record_id uuid";
1273
1548
  readonly returns: "timestamp with time zone";
1274
1549
  readonly security: "definer";
1550
+ }, {
1551
+ readonly name: "record_history";
1552
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0";
1553
+ readonly returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)";
1554
+ readonly security: "definer";
1275
1555
  }, {
1276
1556
  readonly name: "record_relation_edges";
1277
1557
  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";
@@ -1292,11 +1572,26 @@ declare const STORE_DOORS: readonly [{
1292
1572
  readonly args: "p_organization_id uuid, p_record_id uuid";
1293
1573
  readonly returns: "void";
1294
1574
  readonly security: "definer";
1575
+ }, {
1576
+ readonly name: "record_restore_preview";
1577
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_field_key text DEFAULT NULL::text";
1578
+ readonly returns: "jsonb";
1579
+ readonly security: "definer";
1580
+ }, {
1581
+ readonly name: "record_restore_version";
1582
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer";
1583
+ readonly returns: "jsonb";
1584
+ readonly security: "definer";
1295
1585
  }, {
1296
1586
  readonly name: "record_state_as_of";
1297
1587
  readonly args: "p_record_id uuid, p_at timestamp with time zone";
1298
1588
  readonly returns: "TABLE(state jsonb, replayed boolean)";
1299
1589
  readonly security: "definer";
1590
+ }, {
1591
+ readonly name: "record_table";
1592
+ readonly args: "p_organization_id uuid, p_record_id uuid";
1593
+ readonly returns: "uuid";
1594
+ readonly security: "definer";
1300
1595
  }, {
1301
1596
  readonly name: "record_update";
1302
1597
  readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer";
@@ -1317,6 +1612,11 @@ declare const STORE_DOORS: readonly [{
1317
1612
  readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
1318
1613
  readonly returns: "uuid";
1319
1614
  readonly security: "definer";
1615
+ }, {
1616
+ readonly name: "refusals_claiming_a_level_never_asked";
1617
+ readonly args: "";
1618
+ readonly returns: "TABLE(function_name text, identity_args text, why text)";
1619
+ readonly security: "invoker";
1320
1620
  }, {
1321
1621
  readonly name: "relation_carry";
1322
1622
  readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
@@ -1542,11 +1842,31 @@ declare const STORE_DOORS: readonly [{
1542
1842
  readonly args: "p_organization_id uuid DEFAULT NULL::uuid";
1543
1843
  readonly returns: "boolean";
1544
1844
  readonly security: "invoker";
1845
+ }, {
1846
+ readonly name: "subscription_cadences";
1847
+ readonly args: "p_organization_id uuid";
1848
+ readonly returns: "text[]";
1849
+ readonly security: "definer";
1850
+ }, {
1851
+ readonly name: "subscription_mute";
1852
+ readonly args: "p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true";
1853
+ readonly returns: "boolean";
1854
+ readonly security: "definer";
1855
+ }, {
1856
+ readonly name: "subscriptions";
1857
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
1858
+ readonly returns: "TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean)";
1859
+ readonly security: "definer";
1545
1860
  }, {
1546
1861
  readonly name: "table_capacity";
1547
1862
  readonly args: "p_organization_id uuid, p_table_id uuid";
1548
1863
  readonly returns: "jsonb";
1549
1864
  readonly security: "definer";
1865
+ }, {
1866
+ readonly name: "table_carries_its_rows";
1867
+ readonly args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level";
1868
+ readonly returns: "boolean";
1869
+ readonly security: "definer";
1550
1870
  }, {
1551
1871
  readonly name: "table_contents";
1552
1872
  readonly args: "p_organization_id uuid, p_table_id uuid";
@@ -1652,6 +1972,11 @@ declare const STORE_DOORS: readonly [{
1652
1972
  readonly args: "p_organization_id uuid, p_record_id uuid, p_key text";
1653
1973
  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)";
1654
1974
  readonly security: "definer";
1975
+ }, {
1976
+ readonly name: "value_restore";
1977
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer";
1978
+ readonly returns: "jsonb";
1979
+ readonly security: "definer";
1655
1980
  }, {
1656
1981
  readonly name: "value_versions";
1657
1982
  readonly args: "p_old jsonb, p_new jsonb";
@@ -1712,6 +2037,11 @@ declare const STORE_DOORS: readonly [{
1712
2037
  readonly args: "p_organization_id uuid, p_approval_id uuid, p_approve boolean, p_note text DEFAULT NULL::text";
1713
2038
  readonly returns: "jsonb";
1714
2039
  readonly security: "definer";
2040
+ }, {
2041
+ readonly name: "work_approval_kinds";
2042
+ readonly args: "";
2043
+ readonly returns: "text[]";
2044
+ readonly security: "invoker";
1715
2045
  }, {
1716
2046
  readonly name: "work_approval_may_decide";
1717
2047
  readonly args: "p_organization_id uuid, p_approval_id uuid";
@@ -1807,6 +2137,11 @@ declare const STORE_DOORS: readonly [{
1807
2137
  readonly args: "p_organization_id uuid, p_name text, p_slug text, p_home_id uuid DEFAULT NULL::uuid";
1808
2138
  readonly returns: "jsonb";
1809
2139
  readonly security: "definer";
2140
+ }, {
2141
+ readonly name: "work_state_id";
2142
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_value text";
2143
+ readonly returns: "uuid";
2144
+ readonly security: "invoker";
1810
2145
  }, {
1811
2146
  readonly name: "work_states";
1812
2147
  readonly args: "";
@@ -1878,6 +2213,10 @@ declare const STORE_KNOBS: readonly [{
1878
2213
  readonly key: "consumer_checkout_enabled";
1879
2214
  readonly value: "false";
1880
2215
  readonly type: "boolean";
2216
+ }, {
2217
+ readonly key: "consumer_context_enabled";
2218
+ readonly value: "false";
2219
+ readonly type: "boolean";
1881
2220
  }, {
1882
2221
  readonly key: "consumer_education_enabled";
1883
2222
  readonly value: "false";
@@ -2003,37 +2342,40 @@ declare const STORE_KNOBS: readonly [{
2003
2342
  */
2004
2343
  declare const STORE_REFUSAL_CODES: readonly [{
2005
2344
  readonly code: "02000";
2006
- readonly raised_by: "doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_read,doc_template_save,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,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,organization_clear,read_record,record_delete,record_restore,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
2345
+ readonly raised_by: "dashboard_delete,dashboard_run,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
2007
2346
  }, {
2008
2347
  readonly code: "0A000";
2009
- readonly raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign,work_slots_declare";
2348
+ readonly raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign";
2010
2349
  }, {
2011
2350
  readonly code: "22004";
2012
- readonly raised_by: "_entity_custom_fields_guard,_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,form_declare,form_submit,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,migrate_undo,organization_clear,organization_contents,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,rule_declare,share_grant,table_declare,work_approval_decide,work_approval_request,work_template_declare";
2351
+ readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,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,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,portal_declare,portal_invite,portal_principal_bind,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,rule_declare,share_grant,table_declare,value_restore,work_approval_decide,work_approval_request,work_template_declare";
2352
+ }, {
2353
+ readonly code: "22007";
2354
+ readonly raised_by: "dashboard_window_sql";
2013
2355
  }, {
2014
2356
  readonly code: "22012";
2015
2357
  readonly raised_by: "rule_eval";
2016
2358
  }, {
2017
2359
  readonly code: "22023";
2018
- readonly raised_by: "_entity_custom_fields_guard,_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,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,my_levels,organization_clear,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
2360
+ readonly raised_by: "_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,io_import_open,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,portal_declare,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
2019
2361
  }, {
2020
2362
  readonly code: "23503";
2021
- readonly raised_by: "_containment_guard,_field_document_for,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,delete_rule,doc_sign,doc_template_save,form_declare,form_submit,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_declare,rule_eval,rule_members,rule_run,work_set_state,work_take_assignment,work_template_instantiate";
2363
+ readonly raised_by: "_containment_guard,_field_document_for,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,form_declare,form_submit,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_declare,rule_eval,rule_members,rule_run,subscription_mute,work_set_state,work_take_assignment,work_template_instantiate";
2022
2364
  }, {
2023
2365
  readonly code: "23505";
2024
2366
  readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_approval_decide,work_slot_hold";
2025
2367
  }, {
2026
2368
  readonly code: "23514";
2027
- readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_entity_custom_fields_guard,_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,_workdoors_approval_guard,assert_entity_is_organization_scoped,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
2369
+ readonly raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_entity_custom_fields_guard,_field_class_guard,_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,_workdoors_approval_guard,assert_entity_is_organization_scoped,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
2028
2370
  }, {
2029
2371
  readonly code: "40001";
2030
2372
  readonly raised_by: "has_visibility_at";
2031
2373
  }, {
2032
2374
  readonly code: "42501";
2033
- 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,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,io_comment_resolve,io_comment_write,io_restore,migrate_purge,my_levels,organization_clear,promote_table,query_visibility_parity,read_record,read_records,share_grant,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
2375
+ 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,comment_write,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,io_comment_resolve,io_comment_write,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
2034
2376
  }, {
2035
2377
  readonly code: "42703";
2036
- readonly raised_by: "entity_table";
2378
+ readonly raised_by: "entity_table,portal_declare";
2037
2379
  }, {
2038
2380
  readonly code: "53400";
2039
2381
  readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
@@ -2556,6 +2898,14 @@ interface NewFieldDeclaration {
2556
2898
  parity_type?: ParityFieldType;
2557
2899
  /** Plain text, a long text or a plain number — the three that carry no parity type. */
2558
2900
  plain?: "text" | "long_text" | "number";
2901
+ /**
2902
+ * THE ONE WORD EVERY OTHER CALLER REACHES FOR. An agent, a script, an import
2903
+ * and this package's own table-declaring path all say `type`, and until
2904
+ * 2026-09-20 `custom._field_document_for` threw it away — a `number` became a
2905
+ * text column in silence. It now resolves all three vocabularies, so this is
2906
+ * named here rather than left as a shape only the store knows about.
2907
+ */
2908
+ type?: FieldTypeWord;
2559
2909
  /** Derived from the label when absent, which is why the panel never asks for it. */
2560
2910
  key?: string;
2561
2911
  required?: boolean;
@@ -2584,8 +2934,42 @@ interface NewFieldDeclaration {
2584
2934
  expr?: Record<string, unknown>;
2585
2935
  compute_on?: ComputeOn;
2586
2936
  relation_max?: number;
2937
+ /**
2938
+ * REL / FLD-11. The Table this column points at, when it is neither a Person
2939
+ * (`member`) nor a File (`attachment`). The store has taken it since
2940
+ * 2026-09-20 and no client type named it, so a person with an Invoice table
2941
+ * and a Line table could not declare the link through this package at all.
2942
+ */
2943
+ relation_target?: Uuid;
2944
+ /** REL-2. What happens to this record when the thing it points at goes. */
2945
+ on_target_delete?: OnDelete;
2946
+ /**
2947
+ * Presentation and behaviour settings the store carries verbatim — a long
2948
+ * text's `multiline`, a list's existing options table. The door has always
2949
+ * read it (`p_spec -> 'config'`) and this interface never offered it, so a
2950
+ * package-owned table could not declare its own multi-line column.
2951
+ */
2952
+ config?: Record<string, unknown>;
2953
+ /** A text column that holds a signature (`custom.doc_sign` accepts no other). */
2954
+ format?: string;
2587
2955
  }
2588
- /** What `custom.field_update` accepts: a field's settings, never what it holds. */
2956
+ /**
2957
+ * Every word `custom._field_document_for` resolves for `type`: one of the
2958
+ * thirteen, one of the five behaviours, or one of the plain synonyms a person
2959
+ * or an agent actually writes.
2960
+ */
2961
+ type FieldTypeWord = ParityFieldType | FieldBehavior | "number" | "integer" | "decimal" | "float" | "long_text" | "string";
2962
+ /**
2963
+ * What `custom.field_update` accepts.
2964
+ *
2965
+ * THE SETTINGS **AND** THE BEHAVIOUR. The door has had a behaviour arm since
2966
+ * T12 — say `parity_type`, `plain` or `type` and every value of the column is
2967
+ * converted (or kept in `_retired` with its reason) by
2968
+ * `custom._field_type_converts_values`. This interface named only the settings,
2969
+ * so the one client that needed to move a field back onto the behaviour it is
2970
+ * written against had no door and reached for `custom.record_update` instead,
2971
+ * which writes the document under the guards rather than through them.
2972
+ */
2589
2973
  interface FieldPatch {
2590
2974
  label?: string;
2591
2975
  required?: boolean;
@@ -2597,8 +2981,79 @@ interface FieldPatch {
2597
2981
  rules?: FieldRule[];
2598
2982
  /** The choices of a choice list, rewritten. A choice still wanted keeps its id. */
2599
2983
  options?: string[];
2984
+ /** One of the thirteen — a change of what this column HOLDS, not of a setting. */
2985
+ parity_type?: ParityFieldType;
2986
+ /** …or one of the three plain behaviours, …*/
2987
+ plain?: "text" | "long_text" | "number";
2988
+ /** …or the one word every other caller reaches for (see `NewFieldDeclaration`). */
2989
+ type?: FieldTypeWord;
2990
+ /**
2991
+ * FLD-2. The shape of the value. The door reads it ONLY inside its behaviour
2992
+ * arm, so a patch that moves `multi` alone changes nothing — send the
2993
+ * behaviour word with it.
2994
+ */
2995
+ multi?: boolean;
2996
+ /** REL / FLD-11: re-point the column. The old edges are withdrawn by the door. */
2997
+ relation_target?: Uuid;
2998
+ on_target_delete?: OnDelete;
2999
+ /** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
3000
+ promoted?: boolean;
3001
+ unique?: boolean;
3002
+ /** §D / T7: which fields a worked-out column reads. */
3003
+ depends_on?: Uuid[];
2600
3004
  }
2601
3005
 
3006
+ /** One option, as `_choices` names it and as `optionsOf` returns it. */
3007
+ interface ChoiceOption {
3008
+ /** The stable key the cell actually holds. */
3009
+ key: string;
3010
+ /** What a person reads. */
3011
+ label: string;
3012
+ /** The option RECORD's id, for a caller that needs the row itself. */
3013
+ id?: string;
3014
+ /** True when the option was retired: still readable, no longer pickable. */
3015
+ retired?: boolean;
3016
+ /** Why it is no longer offered, in a sentence, when it is retired. */
3017
+ reason?: string | null;
3018
+ }
3019
+ /**
3020
+ * The stable key of an option RECORD as `custom.field_options` returns it.
3021
+ *
3022
+ * It lives in `metadata.option_key`, not in the document: FLD-5 keeps a category to one title
3023
+ * field, and the key is the store's own bookkeeping rather than a column anybody declared.
3024
+ * The fallback is the same slug the store derives, so an option written by something that has
3025
+ * not caught up still answers.
3026
+ */
3027
+ declare function optionKey(option: StoredRecord): string;
3028
+ /** What a person reads on an option record. */
3029
+ declare function optionLabel(option: StoredRecord): string;
3030
+ /**
3031
+ * The store's own slug, mirrored so a client can predict a key without a round trip.
3032
+ * `custom.choice_slug` is the original; a title with nothing a-z0-9 in it gets a short hash of
3033
+ * itself there, and this returns the empty-ish fallback rather than guessing a hash — a caller
3034
+ * that needs the real key for such a title reads it off the option.
3035
+ */
3036
+ declare function choiceSlug(word: string): string;
3037
+ /**
3038
+ * Does this stored (or typed) value name this option? The key, the label and the option's own
3039
+ * id all name the same choice, and a control has to recognise every one of them: what the read
3040
+ * door hands it is the LABEL, what the store holds is the KEY, and what a screen written before
3041
+ * this contract sends is the ID.
3042
+ */
3043
+ declare function isTheChosen(option: StoredRecord, value: unknown): boolean;
3044
+ /** Every value of one cell, as strings, whether the Field is multi or not. */
3045
+ declare function choiceValuesOf(value: unknown): string[];
3046
+ /**
3047
+ * What the read door said about one column's choices: the key behind the label, and whether the
3048
+ * option was retired and why. Returns an empty array when the document carries no `_choices`
3049
+ * entry for that column, which is also what a document written before this contract looks like.
3050
+ */
3051
+ declare function choicesOf(document: RecordDocument | undefined, fieldKeyOrId: string): ChoiceOption[];
3052
+ /** True when this cell's value points at a choice that has since been retired. */
3053
+ declare function holdsARetiredChoice(document: RecordDocument | undefined, fieldKeyOrId: string): boolean;
3054
+ /** True when a token looks like a uuid — which a choice value is no longer allowed to be. */
3055
+ declare function looksLikeAnId(value: unknown): boolean;
3056
+
2602
3057
  /** The seven table types. Only these two carry custom fields (REC-34, DD-011). */
2603
3058
  type CustomFieldTableType = "entity" | "detail";
2604
3059
  /** What `custom.entity_table` answers about a registry token. */
@@ -2808,10 +3263,144 @@ interface FormSummary {
2808
3263
  */
2809
3264
  declare function publicFormPath(formId: string): string;
2810
3265
 
3266
+ /** One portal as `custom.portals` reports it to its organization. */
3267
+ interface PortalSummary {
3268
+ portal_id: Uuid;
3269
+ title: string;
3270
+ slug: string;
3271
+ /** The Table whose records ARE the clients. A principal is one of its rows. */
3272
+ client_table_id: Uuid;
3273
+ /** That Table's name, so a list never has to read a second door to draw a row. */
3274
+ client_table: string;
3275
+ is_active: boolean;
3276
+ /** How many Tables this portal exposes. */
3277
+ tables: number;
3278
+ /** Everybody invited and not revoked — NOT everybody who can see anything. */
3279
+ invited: number;
3280
+ /** Of those, how many have followed the link and hold an identity. */
3281
+ signed_in: number;
3282
+ /** `magic_link` today, and the door refuses every other word by name. */
3283
+ sign_in_method: string;
3284
+ opened_at: Timestamp | null;
3285
+ }
3286
+ /** One Table a portal exposes, as `custom.portal_card` reports it. */
3287
+ interface PortalTableExposure {
3288
+ table_id: Uuid;
3289
+ /** The Table's own name. */
3290
+ name: string;
3291
+ /**
3292
+ * The key of the relation Field that says WHOSE a record is. This is the
3293
+ * whole of "only theirs": the association that Field writes is what carries
3294
+ * the record to the client, so a portal cannot exist without one.
3295
+ */
3296
+ names_via: string;
3297
+ /** The field keys a client sees. Empty is impossible — the door fills it. */
3298
+ visible_fields: string[];
3299
+ /** The subset a client may change. Always a subset of `visible_fields`. */
3300
+ editable_fields: string[];
3301
+ comments: boolean;
3302
+ /**
3303
+ * The most a client is ever conveyed on this Table — `viewer`, `commenter`
3304
+ * or `editor` — worked out by the door from the two lists above, never by a
3305
+ * screen.
3306
+ */
3307
+ conveys: string;
3308
+ }
3309
+ /** One person a portal was opened to, as `custom.portal_card` reports them. */
3310
+ interface PortalPrincipal {
3311
+ principal_id: Uuid;
3312
+ email: string;
3313
+ /** The record of the client Table this person IS, for the portal's purposes. */
3314
+ client_record_id: Uuid;
3315
+ /** That record's title — what an owner calls this client. */
3316
+ client: string;
3317
+ /** They followed the link and hold an identity. Until then this is false. */
3318
+ signed_in: boolean;
3319
+ /** Not revoked. An invitation that was never followed is still active. */
3320
+ is_active: boolean;
3321
+ invited_at: Timestamp;
3322
+ revoked_at: Timestamp | null;
3323
+ }
3324
+ /** Everything about ONE portal: what it shows, and who it was opened to. */
3325
+ interface PortalCard {
3326
+ portal_id: Uuid;
3327
+ title: string;
3328
+ slug: string;
3329
+ is_active: boolean;
3330
+ sign_in_method: string;
3331
+ client_table_id: Uuid;
3332
+ tables: PortalTableExposure[];
3333
+ principals: PortalPrincipal[];
3334
+ /**
3335
+ * Whether this organization's outside lane is open
3336
+ * (`custom/external_principal_enabled`). Declaring a portal opens it; while
3337
+ * it is false every door refuses an outsider BY NAME, and a screen that drew
3338
+ * the people as reachable anyway would be lying about the one thing that
3339
+ * decides whether they can sign in at all.
3340
+ */
3341
+ external_lane_open: boolean;
3342
+ }
3343
+ /** What `custom.portal_invite` answers. `say` is the door's own sentence. */
3344
+ interface PortalInvitation {
3345
+ invited: boolean;
3346
+ principal_id: Uuid;
3347
+ portal_id: Uuid;
3348
+ slug: string;
3349
+ email: string;
3350
+ client_record_id: Uuid;
3351
+ client: string;
3352
+ /** They already hold an identity. From a screen this is false: the door is passed no user. */
3353
+ bound: boolean;
3354
+ /**
3355
+ * The door's own words, and the ONLY correct summary of what just happened —
3356
+ * it says outright that an invitation confers nothing until the link is
3357
+ * followed. Show it; never paraphrase it.
3358
+ */
3359
+ say: string;
3360
+ }
3361
+ /** What `custom.portal_revoke` answers. `say` names the consequence, past tense. */
3362
+ interface PortalRevocation {
3363
+ revoked: boolean;
3364
+ principal_id: Uuid;
3365
+ email: string;
3366
+ /** The door's own sentence: they can no longer sign in, and their records stop reaching them. */
3367
+ say: string;
3368
+ }
3369
+ /** One row of "what this client sees", from `custom.portal_preview`. */
3370
+ interface PortalPreviewRow {
3371
+ record_id: Uuid;
3372
+ title: string;
3373
+ }
3374
+ /**
3375
+ * THE PUBLIC ADDRESS OF A PORTAL, and the one place its shape is written down.
3376
+ *
3377
+ * Unlike a form's link, a portal's slug is NOT the capability: the page it
3378
+ * serves asks who you are and emails a one-time link, so the slug is a name and
3379
+ * nothing more. That is why it is readable and why copying it is safe.
3380
+ */
3381
+ declare function portalPath(slug: string): string;
3382
+
2811
3383
  /** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
2812
3384
  type AggregateOperation = "count" | "sum" | "avg" | "min" | "max";
2813
3385
  /** The periods a date Field can be bucketed into (`custom.agg_buckets()`). */
2814
3386
  type AggregateBucket = "day" | "week" | "month" | "quarter" | "year";
3387
+ /**
3388
+ * A HALF-OPEN MOMENT WINDOW: `from` is inclusive, `to` is exclusive. Half-open
3389
+ * is the only shape that makes "September" and "October" meet exactly once —
3390
+ * an inclusive `to` either double-counts the boundary moment or drops it,
3391
+ * depending on the reader, and both of those are a chart telling a lie.
3392
+ */
3393
+ interface AggregateWindow {
3394
+ from?: string | null;
3395
+ to?: string | null;
3396
+ }
3397
+ /**
3398
+ * ONE FILTER VALUE, as `custom.record_aggregate` and `custom.dashboard_run`
3399
+ * both read it: a SCALAR is an equality, and an OBJECT is a window. It is not
3400
+ * `unknown` on purpose — a filter value the store cannot read is a refusal a
3401
+ * caller should get from the compiler, not from the database.
3402
+ */
3403
+ type AggregateFilter = string | number | boolean | null | AggregateWindow;
2815
3404
  /** One measure. `count` counts rows and needs no Field; the rest read one. */
2816
3405
  interface AggregateMeasure {
2817
3406
  op: AggregateOperation;
@@ -2831,6 +3420,107 @@ interface AggregateRow {
2831
3420
  /** The measure key the store answers with, so a chart can find its own series. */
2832
3421
  declare function measureKey(measure: AggregateMeasure): string;
2833
3422
 
3423
+ /** The seven shapes a block can take, exactly as `custom.dashboard_kinds()` answers. */
3424
+ type DashboardBlockKind = "number" | "bar" | "column" | "line" | "donut" | "table" | "stuck";
3425
+ /**
3426
+ * ONE SAVED BLOCK — the spec, not the answer. `table_id` left out means the
3427
+ * dashboard's own subject Table, and `state_key` / `days` belong to `stuck`
3428
+ * alone (the door refuses a `stuck` block that names no field to watch).
3429
+ */
3430
+ interface DashboardBlock {
3431
+ title?: string;
3432
+ kind: DashboardBlockKind;
3433
+ /** Absent = the dashboard's subject Table. */
3434
+ table_id?: Uuid | null;
3435
+ /** Field keys whose values become the groups. */
3436
+ group_by?: string[];
3437
+ /** `count` needs no key; every other operation reads one Field. */
3438
+ measures?: AggregateMeasure[];
3439
+ /** A date Field truncated to a period. */
3440
+ bucket?: {
3441
+ key: string;
3442
+ by: AggregateBucket;
3443
+ } | null;
3444
+ /** A scalar is an equality; an object is a half-open moment window. */
3445
+ filter?: Record<string, AggregateFilter> | null;
3446
+ /** Rows this block reads. The door clamps it to 1…500 and defaults to 50. */
3447
+ limit?: number;
3448
+ /** Columns of the twelve this block occupies. The door clamps it to 2…12 and defaults to 6. */
3449
+ span?: number;
3450
+ /** `stuck` only: the field whose value is watched for a change. */
3451
+ state_key?: string;
3452
+ /** `stuck` only: how long a record may sit on the same value. Defaults to 14. */
3453
+ days?: number;
3454
+ }
3455
+ /** One dashboard as `custom.dashboards` reports it to its organization. */
3456
+ interface DashboardSummary {
3457
+ dashboard_id: Uuid;
3458
+ /** The subject Table: the one a block that names no table of its own reads. */
3459
+ table_id: Uuid | null;
3460
+ name: string;
3461
+ blocks: DashboardBlock[];
3462
+ presentation: Record<string, unknown>;
3463
+ block_count: number;
3464
+ version: number;
3465
+ created_at: Timestamp;
3466
+ updated_at: Timestamp;
3467
+ }
3468
+ /**
3469
+ * One row of a `stuck` block: a record that has sat on the same value of
3470
+ * `state` for `days_unchanged` days. `measured_from` names WHERE that age was
3471
+ * measured from, because a record whose history does not reach back that far is
3472
+ * aged from what the store actually knows and says so.
3473
+ */
3474
+ interface StuckRow {
3475
+ record_id: Uuid;
3476
+ title: string | null;
3477
+ state: string | null;
3478
+ last_changed_at: Timestamp | null;
3479
+ days_unchanged: number;
3480
+ measured_from: string;
3481
+ }
3482
+ /**
3483
+ * ONE BLOCK'S ANSWER. The door echoes the block back NORMALIZED — the defaults
3484
+ * it applied, the merged filter it actually ran — and adds `rows` and `ms`;
3485
+ * a block it could not run carries `refused` and `sqlstate` INSTEAD of rows,
3486
+ * and a block it could not even normalize carries only its title and kind.
3487
+ */
3488
+ interface DashboardBlockResult {
3489
+ title: string;
3490
+ kind: DashboardBlockKind | (string & {});
3491
+ table_id?: Uuid;
3492
+ group_by?: string[];
3493
+ measures?: AggregateMeasure[];
3494
+ bucket?: {
3495
+ key: string;
3496
+ by: AggregateBucket;
3497
+ } | null;
3498
+ /** The block's own filter with the canvas bar merged under it — the block's own key wins. */
3499
+ filter?: Record<string, AggregateFilter>;
3500
+ limit?: number;
3501
+ span?: number;
3502
+ state_key?: string;
3503
+ days?: number;
3504
+ /** An aggregate block's groups and measures, or a `stuck` block's records. Absent when refused. */
3505
+ rows?: AggregateRow[] | StuckRow[];
3506
+ /** How long this one block took, in milliseconds. Absent when refused. */
3507
+ ms?: number;
3508
+ /** The store's own sentence, when this block could not be run. */
3509
+ refused?: string;
3510
+ /** The SQLSTATE that refusal carried. */
3511
+ sqlstate?: string;
3512
+ }
3513
+ /** What `custom.dashboard_run` answers: the canvas, and every block's own result. */
3514
+ interface DashboardRunResult {
3515
+ dashboard_id: Uuid;
3516
+ name: string | null;
3517
+ subject_table_id: Uuid | null;
3518
+ presentation: Record<string, unknown>;
3519
+ /** The one filter bar this run was asked with. */
3520
+ filter: Record<string, AggregateFilter>;
3521
+ blocks: DashboardBlockResult[];
3522
+ }
3523
+
2834
3524
  /** One token found in a body, in the order it appears. */
2835
3525
  interface DocToken {
2836
3526
  ordinal: number;
@@ -2855,7 +3545,6 @@ interface DocSignatureCheck {
2855
3545
  /** `custom.doc_template` — a body with tokens, and the Table it renders. */
2856
3546
  interface DocTemplateRow {
2857
3547
  id: Uuid;
2858
- organization_id: Uuid;
2859
3548
  renders_table_id: Uuid;
2860
3549
  name: string;
2861
3550
  body: string;
@@ -2907,6 +3596,25 @@ interface Subscription {
2907
3596
  event_key: string;
2908
3597
  name: string;
2909
3598
  }
3599
+ /**
3600
+ * ONE SUBSCRIPTION AS ITS OWNER SEES IT — `custom.subscriptions`.
3601
+ *
3602
+ * `custom.agg_subscriptions` is the NOTIFIER's reader: it answers the whole
3603
+ * organization's firing subscriptions so the delivery path can run, and it is
3604
+ * not callable by a client. This is the other side of the same rows — narrowed
3605
+ * to Tables the caller can already open, so the list never reveals a Table —
3606
+ * and it carries the two things a screen needs and the notifier does not: is it
3607
+ * switched off, and may I switch it off.
3608
+ */
3609
+ interface MySubscription extends Subscription {
3610
+ table_id: Uuid | null;
3611
+ /** Off. `custom.agg_subscriptions` already excludes a muted one, so this is the truth. */
3612
+ muted: boolean;
3613
+ /** It is addressed to me. */
3614
+ mine: boolean;
3615
+ /** I may switch it off: mine, or I hold admin on the Table it watches. */
3616
+ i_may_mute: boolean;
3617
+ }
2910
3618
  /** The `subscription` block a Rule record carries. Written through `record_write`. */
2911
3619
  interface SubscriptionBlock {
2912
3620
  saved_view_id: Uuid;
@@ -3871,6 +4579,99 @@ interface RecordsClient {
3871
4579
  form_id?: Uuid | null;
3872
4580
  slug?: string | null;
3873
4581
  }): Promise<RecordsResult<Uuid>>;
4582
+ /** Every portal over this organization the caller may know about, with its numbers. */
4583
+ portals(): Promise<RecordsResult<PortalSummary[]>>;
4584
+ /** ONE portal in full: what it shows, and who it was opened to. */
4585
+ portalCard(args: {
4586
+ portal_id: Uuid;
4587
+ }): Promise<RecordsResult<PortalCard>>;
4588
+ /**
4589
+ * Create or RE-STATE one portal. Re-stating REPLACES what it exposes — a
4590
+ * Table left out of `tables` stops being exposed in the same act — and leaves
4591
+ * the people alone: who is invited is not part of what the portal shows.
4592
+ */
4593
+ portalDeclare(args: {
4594
+ title: string;
4595
+ client_table_id: Uuid;
4596
+ tables: Array<{
4597
+ table_id: Uuid;
4598
+ names_via: string;
4599
+ visible_fields?: string[];
4600
+ editable_fields?: string[];
4601
+ comments?: boolean;
4602
+ }>;
4603
+ portal_id?: Uuid | null;
4604
+ slug?: string | null;
4605
+ sign_in_method?: string | null;
4606
+ }): Promise<RecordsResult<Uuid>>;
4607
+ /**
4608
+ * Invite one person, as one record of the portal's client Table.
4609
+ *
4610
+ * `user_id` is deliberately NOT a parameter here. From a screen it is always
4611
+ * null: an invitation confers NOTHING until the person follows their sign-in
4612
+ * link and the platform gives them an identity, and the door's own `say`
4613
+ * sentence states exactly that. A screen that passed an id would be granting
4614
+ * access on somebody else's behalf.
4615
+ */
4616
+ portalInvite(args: {
4617
+ portal_id: Uuid;
4618
+ client_record_id: Uuid;
4619
+ email: string;
4620
+ }): Promise<RecordsResult<PortalInvitation>>;
4621
+ /** Take one person's way in away. The answer's `say` names the consequence. */
4622
+ portalRevoke(args: {
4623
+ portal_id: Uuid;
4624
+ principal_id: Uuid;
4625
+ }): Promise<RecordsResult<PortalRevocation>>;
4626
+ /**
4627
+ * VIEW AS THIS CLIENT. The door asks `custom.visible_set` for HER user id —
4628
+ * the same call `custom.read_records` makes when she opens the page — so this
4629
+ * cannot disagree with what she sees. It REFUSES with `02000` and a sentence
4630
+ * when she has not signed in yet; show the sentence, never an empty list.
4631
+ */
4632
+ portalPreview(args: {
4633
+ portal_id: Uuid;
4634
+ principal_id: Uuid;
4635
+ table_id: Uuid;
4636
+ }): Promise<RecordsResult<PortalPreviewRow[]>>;
4637
+ /** This organization's dashboards, optionally only those whose subject is one Table. */
4638
+ dashboards(args?: {
4639
+ table_id?: Uuid | null;
4640
+ }): Promise<RecordsResult<DashboardSummary[]>>;
4641
+ /**
4642
+ * Create or re-state one dashboard. Every block is judged on the way IN —
4643
+ * a block naming a field this Table does not have is refused BY NAME, with
4644
+ * the table's own field list in the hint — so a canvas cannot be saved broken.
4645
+ */
4646
+ dashboardDeclare(args: {
4647
+ table_id: Uuid;
4648
+ name: string;
4649
+ blocks?: DashboardBlock[];
4650
+ presentation?: Record<string, unknown> | null;
4651
+ dashboard_id?: Uuid | null;
4652
+ }): Promise<RecordsResult<Uuid>>;
4653
+ /**
4654
+ * Run every block and answer the numbers. `filter` is the ONE filter bar
4655
+ * across the canvas: it is merged UNDER each block's own filter, so a block
4656
+ * deliberately scoped to one stage stays scoped while the bar moves the rest.
4657
+ * A block that refuses carries the store's sentence and the others still answer.
4658
+ */
4659
+ dashboardRun(args: {
4660
+ dashboard_id: Uuid;
4661
+ filter?: Record<string, AggregateFilter>;
4662
+ }): Promise<RecordsResult<DashboardRunResult>>;
4663
+ /** The seventh block kind on its own: records that have sat on the same value too long. */
4664
+ dashboardStuck(args: {
4665
+ table_id: Uuid;
4666
+ state_key: string;
4667
+ days?: number;
4668
+ filter?: Record<string, AggregateFilter>;
4669
+ limit?: number;
4670
+ }): Promise<RecordsResult<StuckRow[]>>;
4671
+ /** Take a dashboard away. The records it counted are untouched — a canvas owns nothing. */
4672
+ dashboardDelete(args: {
4673
+ dashboard_id: Uuid;
4674
+ }): Promise<RecordsResult<boolean>>;
3874
4675
  /**
3875
4676
  * Group, bucket, filter and measure INSIDE `custom.record_aggregate`. The
3876
4677
  * aggregate node sits above the visibility join, so what a chart draws is
@@ -3888,8 +4689,11 @@ interface RecordsClient {
3888
4689
  key: string;
3889
4690
  by: AggregateBucket;
3890
4691
  } | null;
3891
- /** Equality only, and it lands in the SAME WHERE as visibility. */
3892
- filter?: Record<string, string>;
4692
+ /**
4693
+ * A scalar is an equality and an object is a half-open moment window, and
4694
+ * either way it lands in the SAME WHERE as visibility.
4695
+ */
4696
+ filter?: Record<string, AggregateFilter>;
3893
4697
  limit?: number;
3894
4698
  }): Promise<RecordsResult<AggregateRow[]>>;
3895
4699
  /** The measures the store itself offers. Asked, never hardcoded in a picker. */
@@ -3908,6 +4712,33 @@ interface RecordsClient {
3908
4712
  }): Promise<RecordsResult<Subscription[]>>;
3909
4713
  /** The cadences the store itself offers. Asked, never hardcoded in a picker. */
3910
4714
  aggSubscriptionCadences(): Promise<RecordsResult<string[]>>;
4715
+ /**
4716
+ * The same cadences, through the door a PERSON may call.
4717
+ * `aggSubscriptionCadences` is the notifier's own and holds no client grant,
4718
+ * so a screen that asked for it was refused and fell back to a list typed
4719
+ * into the picker — which drifts from what the digest runner honours. This
4720
+ * one delegates to the same array, so there is exactly one list.
4721
+ */
4722
+ subscriptionCadences(): Promise<RecordsResult<string[]>>;
4723
+ /**
4724
+ * WHAT THIS PERSON IS BEING TOLD ABOUT, and what they may switch off.
4725
+ *
4726
+ * Mine, plus anyone's over a Table I hold admin on — narrowed to Tables I can
4727
+ * already open, so the list never reveals one. `aggSubscriptions` above is the
4728
+ * NOTIFIER's reader and no client can call it; this is the owner's.
4729
+ */
4730
+ subscriptions(args?: {
4731
+ table_id?: Uuid | null;
4732
+ }): Promise<RecordsResult<MySubscription[]>>;
4733
+ /**
4734
+ * Switch one on or off. Muting is honoured in ONE place — the reader every
4735
+ * consumer goes through — so a screen can never say a subscription is off
4736
+ * while it keeps firing.
4737
+ */
4738
+ subscriptionMute(args: {
4739
+ rule_id: Uuid;
4740
+ muted: boolean;
4741
+ }): Promise<RecordsResult<boolean>>;
3911
4742
  docTemplateSave(args: {
3912
4743
  table_id: Uuid;
3913
4744
  name: string;
@@ -3943,15 +4774,23 @@ interface RecordsClient {
3943
4774
  docSignatureIntact(args: {
3944
4775
  signature_id: Uuid;
3945
4776
  }): Promise<RecordsResult<unknown>>;
3946
- /** Every template that renders one Table. */
4777
+ /** Every template that renders one Table. Viewer on the Table. */
3947
4778
  docTemplates(args: {
3948
4779
  table_id: Uuid;
3949
4780
  }): Promise<RecordsResult<DocTemplateRow[]>>;
3950
- /** Every frozen render of one record, newest first. */
4781
+ /**
4782
+ * Retire one template. EDITOR on the Table it renders, because a template is
4783
+ * that Table's wording. Documents already rendered keep their frozen bytes
4784
+ * and their seals, so this can never invalidate a signature.
4785
+ */
4786
+ docTemplateDelete(args: {
4787
+ template_id: Uuid;
4788
+ }): Promise<RecordsResult<boolean>>;
4789
+ /** Every frozen render of one record, newest first. Viewer on the record. */
3951
4790
  docRenders(args: {
3952
4791
  record_id: Uuid;
3953
4792
  }): Promise<RecordsResult<DocRenderRow[]>>;
3954
- /** Every signature on one record. */
4793
+ /** Every signature on one record. Viewer on the record. */
3955
4794
  docSignatures(args: {
3956
4795
  record_id: Uuid;
3957
4796
  }): Promise<RecordsResult<DocSignatureRow[]>>;
@@ -4457,4 +5296,4 @@ declare function useFieldMutation(): UseFieldMutation;
4457
5296
  */
4458
5297
  declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
4459
5298
 
4460
- 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, type CustomFieldTableType, DELIVERIES, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, 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 FormSummary, 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 NewEntityFieldDeclaration, 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 UseEntityFieldMutation, 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 WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, err, highestLevel, isRecordsErr, measureKey, ok, publicFormPath, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
5299
+ export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ChoiceOption, type ComputeOn, type ContextPolicy, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, 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 MySubscription, type NewEntityFieldDeclaration, 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 PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, 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 StuckRow, 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 UseEntityFieldMutation, 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 WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, ok, optionKey, optionLabel, portalPath, publicFormPath, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };