@ai-matrx/records 0.7.2 → 0.8.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.
package/dist/index.d.cts CHANGED
@@ -324,6 +324,16 @@ declare const STORE_DOORS: readonly [{
324
324
  readonly args: "p_organization_id uuid, p_door text";
325
325
  readonly returns: "void";
326
326
  readonly security: "invoker";
327
+ }, {
328
+ readonly name: "assert_entity_door";
329
+ readonly args: "p_organization_id uuid, p_door text";
330
+ readonly returns: "void";
331
+ readonly security: "definer";
332
+ }, {
333
+ readonly name: "assert_entity_is_organization_scoped";
334
+ readonly args: "p_token text, p_label text, p_scoped boolean";
335
+ readonly returns: "void";
336
+ readonly security: "invoker";
327
337
  }, {
328
338
  readonly name: "assert_may_know_table";
329
339
  readonly args: "p_organization_id uuid, p_table_id uuid, p_door text";
@@ -469,6 +479,11 @@ declare const STORE_DOORS: readonly [{
469
479
  readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid";
470
480
  readonly returns: "uuid";
471
481
  readonly security: "definer";
482
+ }, {
483
+ readonly name: "doc_render_read";
484
+ readonly args: "p_organization_id uuid, p_render_id uuid";
485
+ readonly returns: "jsonb";
486
+ readonly security: "definer";
472
487
  }, {
473
488
  readonly name: "doc_render_write";
474
489
  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";
@@ -489,11 +504,21 @@ declare const STORE_DOORS: readonly [{
489
504
  readonly args: "p_organization_id uuid, p_signature_id uuid";
490
505
  readonly returns: "jsonb";
491
506
  readonly security: "invoker";
507
+ }, {
508
+ readonly name: "doc_signature_read";
509
+ readonly args: "p_organization_id uuid, p_signature_id uuid";
510
+ readonly returns: "jsonb";
511
+ readonly security: "definer";
492
512
  }, {
493
513
  readonly name: "doc_signature_write";
494
514
  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";
495
515
  readonly returns: "uuid";
496
516
  readonly security: "definer";
517
+ }, {
518
+ readonly name: "doc_template_read";
519
+ readonly args: "p_organization_id uuid, p_template_id uuid";
520
+ readonly returns: "jsonb";
521
+ readonly security: "definer";
497
522
  }, {
498
523
  readonly name: "doc_template_save";
499
524
  readonly args: "p_organization_id uuid, p_table_id uuid, p_name text, p_body text, p_template_id uuid DEFAULT NULL::uuid";
@@ -534,6 +559,51 @@ declare const STORE_DOORS: readonly [{
534
559
  readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
535
560
  readonly returns: "permission_level";
536
561
  readonly security: "definer";
562
+ }, {
563
+ readonly name: "entity_field_declare";
564
+ readonly args: "p_organization_id uuid, p_token text, p_spec jsonb";
565
+ readonly returns: "uuid";
566
+ readonly security: "definer";
567
+ }, {
568
+ readonly name: "entity_field_retire";
569
+ readonly args: "p_organization_id uuid, p_field_id uuid";
570
+ readonly returns: "uuid";
571
+ readonly security: "definer";
572
+ }, {
573
+ readonly name: "entity_field_rights";
574
+ readonly args: "p_organization_id uuid, p_token text";
575
+ readonly returns: "jsonb";
576
+ readonly security: "definer";
577
+ }, {
578
+ readonly name: "entity_field_update";
579
+ readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb";
580
+ readonly returns: "uuid";
581
+ readonly security: "definer";
582
+ }, {
583
+ readonly name: "entity_fields";
584
+ readonly args: "p_organization_id uuid, p_token text";
585
+ readonly returns: "SETOF custom.record";
586
+ readonly security: "definer";
587
+ }, {
588
+ readonly name: "entity_record_read";
589
+ readonly args: "p_organization_id uuid, p_token text, p_record_id uuid";
590
+ readonly returns: "jsonb";
591
+ readonly security: "invoker";
592
+ }, {
593
+ readonly name: "entity_records_find";
594
+ readonly args: "p_organization_id uuid, p_token text, p_key text, p_value jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0";
595
+ readonly returns: "jsonb";
596
+ readonly security: "invoker";
597
+ }, {
598
+ readonly name: "entity_table";
599
+ readonly args: "p_token text";
600
+ readonly returns: "TABLE(token text, schema_name text, table_name text, type text, title_column text, label text, has_organization boolean, has_deleted_at boolean)";
601
+ readonly security: "invoker";
602
+ }, {
603
+ readonly name: "entity_value_write";
604
+ readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_patch jsonb";
605
+ readonly returns: "jsonb";
606
+ readonly security: "invoker";
537
607
  }, {
538
608
  readonly name: "export_records";
539
609
  readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
@@ -629,6 +699,36 @@ declare const STORE_DOORS: readonly [{
629
699
  readonly args: "";
630
700
  readonly returns: "uuid";
631
701
  readonly security: "invoker";
702
+ }, {
703
+ readonly name: "form_declare";
704
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text";
705
+ readonly returns: "uuid";
706
+ readonly security: "definer";
707
+ }, {
708
+ readonly name: "form_notify";
709
+ readonly args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid";
710
+ readonly returns: "uuid";
711
+ readonly security: "invoker";
712
+ }, {
713
+ readonly name: "form_public";
714
+ readonly args: "p_form_id uuid";
715
+ readonly returns: "TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, state text, message text)";
716
+ readonly security: "definer";
717
+ }, {
718
+ readonly name: "form_slug";
719
+ readonly args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid";
720
+ readonly returns: "text";
721
+ readonly security: "invoker";
722
+ }, {
723
+ readonly name: "form_submit";
724
+ readonly args: "p_form_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text";
725
+ readonly returns: "TABLE(submission_id uuid, record_id uuid, state text, message text)";
726
+ readonly security: "definer";
727
+ }, {
728
+ readonly name: "forms";
729
+ readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
730
+ readonly returns: "TABLE(form_id uuid, table_id uuid, title text, slug text, published_at timestamp with time zone, closed_at timestamp with time zone, submission_cap integer, responses bigint, in_table bigint, held bigint, rejected bigint, state text, quarantine_rule_id uuid, notify_rule_id uuid, presentation jsonb)";
731
+ readonly security: "definer";
632
732
  }, {
633
733
  readonly name: "formula_value";
634
734
  readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb";
@@ -889,6 +989,16 @@ declare const STORE_DOORS: readonly [{
889
989
  readonly args: "p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text";
890
990
  readonly returns: "TABLE(id uuid, level permission_level)";
891
991
  readonly security: "definer";
992
+ }, {
993
+ readonly name: "organization_clear";
994
+ readonly args: "p_organization_id uuid, p_confirm text, p_and_destroy boolean DEFAULT false";
995
+ readonly returns: "jsonb";
996
+ readonly security: "definer";
997
+ }, {
998
+ readonly name: "organization_contents";
999
+ readonly args: "p_organization_id uuid";
1000
+ readonly returns: "jsonb";
1001
+ readonly security: "definer";
892
1002
  }, {
893
1003
  readonly name: "organization_kernel_id";
894
1004
  readonly args: "";
@@ -1209,6 +1319,11 @@ declare const STORE_DOORS: readonly [{
1209
1319
  readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
1210
1320
  readonly returns: "uuid";
1211
1321
  readonly security: "definer";
1322
+ }, {
1323
+ readonly name: "relation_edges_withdraw";
1324
+ readonly args: "p_organization_id uuid, p_field_ids uuid[], p_why text";
1325
+ readonly returns: "integer";
1326
+ readonly security: "definer";
1212
1327
  }, {
1213
1328
  readonly name: "relation_own";
1214
1329
  readonly args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid";
@@ -1279,6 +1394,11 @@ declare const STORE_DOORS: readonly [{
1279
1394
  readonly args: "p_organization_id uuid, p_record_id uuid";
1280
1395
  readonly returns: "jsonb";
1281
1396
  readonly security: "invoker";
1397
+ }, {
1398
+ readonly name: "rule_declare";
1399
+ readonly args: "p_organization_id uuid, p_spec jsonb, p_rule_id uuid DEFAULT NULL::uuid";
1400
+ readonly returns: "uuid";
1401
+ readonly security: "definer";
1282
1402
  }, {
1283
1403
  readonly name: "rule_dependency_edges";
1284
1404
  readonly args: "p_organization_id uuid, p_row custom.record DEFAULT NULL::custom.record";
@@ -1579,6 +1699,36 @@ declare const STORE_DOORS: readonly [{
1579
1699
  readonly args: "";
1580
1700
  readonly returns: "uuid";
1581
1701
  readonly security: "invoker";
1702
+ }, {
1703
+ readonly name: "work_approval_approvers";
1704
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid";
1705
+ readonly returns: "TABLE(user_id uuid, name text, why text)";
1706
+ readonly security: "definer";
1707
+ }, {
1708
+ readonly name: "work_approval_decide";
1709
+ readonly args: "p_organization_id uuid, p_approval_id uuid, p_approve boolean, p_note text DEFAULT NULL::text";
1710
+ readonly returns: "jsonb";
1711
+ readonly security: "definer";
1712
+ }, {
1713
+ readonly name: "work_approval_may_decide";
1714
+ readonly args: "p_organization_id uuid, p_approval_id uuid";
1715
+ readonly returns: "boolean";
1716
+ readonly security: "definer";
1717
+ }, {
1718
+ readonly name: "work_approval_read";
1719
+ readonly args: "p_organization_id uuid, p_approval_id uuid";
1720
+ readonly returns: "jsonb";
1721
+ readonly security: "definer";
1722
+ }, {
1723
+ readonly name: "work_approval_request";
1724
+ readonly args: "p_organization_id uuid, p_subject_id uuid, p_change jsonb, p_note text DEFAULT NULL::text, p_approver_id uuid DEFAULT NULL::uuid, p_origin text DEFAULT 'person'::text, p_conversation_id uuid DEFAULT NULL::uuid";
1725
+ readonly returns: "jsonb";
1726
+ readonly security: "definer";
1727
+ }, {
1728
+ readonly name: "work_assign";
1729
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_assignee_user_id uuid, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_clear_due boolean DEFAULT false";
1730
+ readonly returns: "jsonb";
1731
+ readonly security: "definer";
1582
1732
  }, {
1583
1733
  readonly name: "work_assignment_fields";
1584
1734
  readonly args: "p_options_table_id uuid DEFAULT NULL::uuid";
@@ -1588,32 +1738,57 @@ declare const STORE_DOORS: readonly [{
1588
1738
  readonly name: "work_has_assignment";
1589
1739
  readonly args: "p_organization_id uuid, p_table_id uuid";
1590
1740
  readonly returns: "boolean";
1591
- readonly security: "invoker";
1741
+ readonly security: "definer";
1742
+ }, {
1743
+ readonly name: "work_inbox";
1744
+ readonly args: "p_organization_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false";
1745
+ readonly returns: "TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone)";
1746
+ readonly security: "definer";
1592
1747
  }, {
1593
1748
  readonly name: "work_instantiation_shape";
1594
1749
  readonly args: "p_organization_id uuid, p_instantiation_id uuid";
1595
1750
  readonly returns: "jsonb";
1596
- readonly security: "invoker";
1751
+ readonly security: "definer";
1752
+ }, {
1753
+ readonly name: "work_list";
1754
+ readonly args: "p_organization_id uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0";
1755
+ readonly returns: "TABLE(record_id uuid, table_id uuid, table_name text, title text, assignee_id uuid, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, terminal boolean, assigned_by uuid, updated_at timestamp with time zone)";
1756
+ readonly security: "definer";
1757
+ }, {
1758
+ readonly name: "work_person";
1759
+ readonly args: "p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true";
1760
+ readonly returns: "uuid";
1761
+ readonly security: "definer";
1762
+ }, {
1763
+ readonly name: "work_record_states";
1764
+ readonly args: "p_organization_id uuid, p_record_id uuid";
1765
+ readonly returns: "TABLE(state_id uuid, name text, sort integer, terminal boolean, is_current boolean, allowed boolean, refusal text)";
1766
+ readonly security: "definer";
1597
1767
  }, {
1598
1768
  readonly name: "work_relation_kinds";
1599
1769
  readonly args: "";
1600
1770
  readonly returns: "TABLE(kind text, available boolean, why text)";
1601
1771
  readonly security: "invoker";
1772
+ }, {
1773
+ readonly name: "work_set_state";
1774
+ readonly args: "p_organization_id uuid, p_record_id uuid, p_state_id uuid";
1775
+ readonly returns: "jsonb";
1776
+ readonly security: "definer";
1602
1777
  }, {
1603
1778
  readonly name: "work_slot_expire";
1604
1779
  readonly args: "p_organization_id uuid, p_table_id uuid";
1605
1780
  readonly returns: "integer";
1606
- readonly security: "invoker";
1781
+ readonly security: "definer";
1607
1782
  }, {
1608
1783
  readonly name: "work_slot_hold";
1609
1784
  readonly args: "p_organization_id uuid, p_table_id uuid, p_slot_key text, p_holder text, p_ttl interval DEFAULT '00:15:00'::interval";
1610
1785
  readonly returns: "jsonb";
1611
- readonly security: "invoker";
1786
+ readonly security: "definer";
1612
1787
  }, {
1613
1788
  readonly name: "work_slot_holds";
1614
1789
  readonly args: "p_organization_id uuid, p_table_id uuid";
1615
1790
  readonly returns: "TABLE(hold_id uuid, slot_key text, holder text, expires_at timestamp with time zone, expired boolean)";
1616
- readonly security: "invoker";
1791
+ readonly security: "definer";
1617
1792
  }, {
1618
1793
  readonly name: "work_slot_index_name";
1619
1794
  readonly args: "p_table_id uuid";
@@ -1623,12 +1798,12 @@ declare const STORE_DOORS: readonly [{
1623
1798
  readonly name: "work_slot_release";
1624
1799
  readonly args: "p_organization_id uuid, p_hold_id uuid";
1625
1800
  readonly returns: "boolean";
1626
- readonly security: "invoker";
1801
+ readonly security: "definer";
1627
1802
  }, {
1628
1803
  readonly name: "work_slots_declare";
1629
1804
  readonly args: "p_organization_id uuid, p_name text, p_slug text, p_home_id uuid DEFAULT NULL::uuid";
1630
1805
  readonly returns: "jsonb";
1631
- readonly security: "invoker";
1806
+ readonly security: "definer";
1632
1807
  }, {
1633
1808
  readonly name: "work_states";
1634
1809
  readonly args: "";
@@ -1638,17 +1813,17 @@ declare const STORE_DOORS: readonly [{
1638
1813
  readonly name: "work_take_assignment";
1639
1814
  readonly args: "p_organization_id uuid, p_table_id uuid";
1640
1815
  readonly returns: "jsonb";
1641
- readonly security: "invoker";
1816
+ readonly security: "definer";
1642
1817
  }, {
1643
1818
  readonly name: "work_template_declare";
1644
1819
  readonly args: "p_organization_id uuid, p_name text, p_graph jsonb";
1645
1820
  readonly returns: "uuid";
1646
- readonly security: "invoker";
1821
+ readonly security: "definer";
1647
1822
  }, {
1648
1823
  readonly name: "work_template_instantiate";
1649
1824
  readonly args: "p_organization_id uuid, p_template_id uuid, p_overrides jsonb DEFAULT '{}'::jsonb";
1650
1825
  readonly returns: "jsonb";
1651
- readonly security: "invoker";
1826
+ readonly security: "definer";
1652
1827
  }, {
1653
1828
  readonly name: "work_template_refusal";
1654
1829
  readonly args: "p_graph jsonb";
@@ -1658,17 +1833,22 @@ declare const STORE_DOORS: readonly [{
1658
1833
  readonly name: "work_template_shape";
1659
1834
  readonly args: "p_organization_id uuid, p_template_id uuid";
1660
1835
  readonly returns: "jsonb";
1661
- readonly security: "invoker";
1836
+ readonly security: "definer";
1837
+ }, {
1838
+ readonly name: "work_templates";
1839
+ readonly args: "p_organization_id uuid, p_limit integer DEFAULT 100";
1840
+ readonly returns: "TABLE(template_id uuid, name text, nodes integer, relations integer, created_at timestamp with time zone)";
1841
+ readonly security: "definer";
1662
1842
  }, {
1663
1843
  readonly name: "work_transition_refusal";
1664
1844
  readonly args: "p_organization_id uuid, p_from_state_id uuid, p_to_state_id uuid";
1665
1845
  readonly returns: "text";
1666
- readonly security: "invoker";
1846
+ readonly security: "definer";
1667
1847
  }, {
1668
1848
  readonly name: "work_whose_turn";
1669
1849
  readonly args: "p_organization_id uuid, p_table_id uuid, p_include_finished boolean DEFAULT false";
1670
1850
  readonly returns: "TABLE(record_id uuid, title text, assignee_id uuid, turn text, due_on timestamp with time zone, state text, status text, terminal boolean)";
1671
- readonly security: "invoker";
1851
+ readonly security: "definer";
1672
1852
  }];
1673
1853
  /** The campaign's own knobs, with the value the store resolves them to today. */
1674
1854
  declare const STORE_KNOBS: readonly [{
@@ -1820,34 +2000,37 @@ declare const STORE_KNOBS: readonly [{
1820
2000
  */
1821
2001
  declare const STORE_REFUSAL_CODES: readonly [{
1822
2002
  readonly code: "02000";
1823
- 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";
2003
+ 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";
1824
2004
  }, {
1825
2005
  readonly code: "0A000";
1826
- 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";
2006
+ 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";
1827
2007
  }, {
1828
2008
  readonly code: "22004";
1829
- 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";
2009
+ 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";
1830
2010
  }, {
1831
2011
  readonly code: "22012";
1832
2012
  readonly raised_by: "rule_eval";
1833
2013
  }, {
1834
2014
  readonly code: "22023";
1835
- 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";
2015
+ 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";
1836
2016
  }, {
1837
2017
  readonly code: "23503";
1838
- 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";
2018
+ 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";
1839
2019
  }, {
1840
2020
  readonly code: "23505";
1841
- 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";
2021
+ 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";
1842
2022
  }, {
1843
2023
  readonly code: "23514";
1844
- 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";
2024
+ 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";
1845
2025
  }, {
1846
2026
  readonly code: "40001";
1847
2027
  readonly raised_by: "has_visibility_at";
1848
2028
  }, {
1849
2029
  readonly code: "42501";
1850
- 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";
2030
+ 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";
2031
+ }, {
2032
+ readonly code: "42703";
2033
+ readonly raised_by: "entity_table";
1851
2034
  }, {
1852
2035
  readonly code: "53400";
1853
2036
  readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
@@ -2480,6 +2663,37 @@ interface RuleAnswer {
2480
2663
  applies: boolean;
2481
2664
  answer: unknown;
2482
2665
  }
2666
+ /** One form as `custom.forms` reports it to its owner. */
2667
+ interface FormSummary {
2668
+ form_id: string;
2669
+ table_id: string;
2670
+ title: string | null;
2671
+ slug: string;
2672
+ published_at: string | null;
2673
+ closed_at: string | null;
2674
+ submission_cap: number | null;
2675
+ /** Every answer that arrived, rejected ones excluded from `in_table` and `held`. */
2676
+ responses: number;
2677
+ /** Answers that became records — the only number that means "it is in the table". */
2678
+ in_table: number;
2679
+ /** Answers waiting for a person, because the form's accept Rule did not clear them. */
2680
+ held: number;
2681
+ /** Answers the accept Rule or the decoy turned away. */
2682
+ rejected: number;
2683
+ /** draft · open · closed · full — the store's own word, never derived on a screen. */
2684
+ state: "draft" | "open" | "closed" | "full";
2685
+ quarantine_rule_id: string | null;
2686
+ notify_rule_id: string | null;
2687
+ presentation: Record<string, unknown>;
2688
+ }
2689
+ /**
2690
+ * THE PUBLIC LINK, and the one place its shape is written down.
2691
+ *
2692
+ * The form's own id IS the capability — 122 bits of UUIDv4, exactly as
2693
+ * Typeform's form id in `/to/<id>` is and as an unguessable meeting slug is
2694
+ * here. There is no second secret to keep, and revoking it is closing the form.
2695
+ */
2696
+ declare function publicFormPath(formId: string): string;
2483
2697
 
2484
2698
  /** The measures the store offers. Asked of `custom.agg_operations()` at run time too. */
2485
2699
  type AggregateOperation = "count" | "sum" | "avg" | "min" | "max";
@@ -3212,4 +3426,4 @@ interface RecordsConfig {
3212
3426
  schema?: string;
3213
3427
  }
3214
3428
 
3215
- 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, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, err, highestLevel, isRecordsErr, measureKey, ok };
3429
+ 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 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 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, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkAssignmentField, type WorkGraph, type WorkInstantiation, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, err, highestLevel, isRecordsErr, measureKey, ok, publicFormPath };