@ai-matrx/records 0.58.14 → 0.58.16

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.
@@ -977,11 +977,21 @@ declare const STORE_DOORS: readonly [{
977
977
  readonly args: "p_field jsonb, p_value jsonb";
978
978
  readonly returns: "jsonb";
979
979
  readonly security: "invoker";
980
+ }, {
981
+ readonly name: "choice_render_plan";
982
+ readonly args: "p_organization_id uuid, p_table_id uuid";
983
+ readonly returns: "jsonb";
984
+ readonly security: "invoker";
980
985
  }, {
981
986
  readonly name: "choice_render_value";
982
987
  readonly args: "p_field jsonb, p_value jsonb";
983
988
  readonly returns: "jsonb";
984
989
  readonly security: "invoker";
990
+ }, {
991
+ readonly name: "choice_render_with";
992
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb";
993
+ readonly returns: "jsonb";
994
+ readonly security: "invoker";
985
995
  }, {
986
996
  readonly name: "choice_slug";
987
997
  readonly args: "p_word text";
@@ -1067,11 +1077,6 @@ declare const STORE_DOORS: readonly [{
1067
1077
  readonly args: "p_bindings jsonb";
1068
1078
  readonly returns: "jsonb";
1069
1079
  readonly security: "definer";
1070
- }, {
1071
- readonly name: "context_resolve";
1072
- readonly args: "p_organization_id uuid, p_bindings jsonb, p_scope_slug text DEFAULT 'scopes'::text";
1073
- readonly returns: "jsonb";
1074
- readonly security: "definer";
1075
1080
  }, {
1076
1081
  readonly name: "context_tag_copy";
1077
1082
  readonly args: "p_organization_id uuid";
@@ -1477,11 +1482,21 @@ declare const STORE_DOORS: readonly [{
1477
1482
  readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb";
1478
1483
  readonly returns: "jsonb";
1479
1484
  readonly security: "invoker";
1485
+ }, {
1486
+ readonly name: "entity_reference_render_with";
1487
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb";
1488
+ readonly returns: "jsonb";
1489
+ readonly security: "invoker";
1480
1490
  }, {
1481
1491
  readonly name: "entity_reference_rows";
1482
1492
  readonly args: "p_organization_id uuid, p_token text, p_ids uuid[]";
1483
1493
  readonly returns: "jsonb";
1484
1494
  readonly security: "invoker";
1495
+ }, {
1496
+ readonly name: "entity_reference_target";
1497
+ readonly args: "p_token text";
1498
+ readonly returns: "jsonb";
1499
+ readonly security: "definer";
1485
1500
  }, {
1486
1501
  readonly name: "entity_reference_words";
1487
1502
  readonly args: "p_organization_id uuid, p_refs jsonb";
@@ -2102,6 +2117,11 @@ declare const STORE_DOORS: readonly [{
2102
2117
  readonly args: "";
2103
2118
  readonly returns: "permission_level";
2104
2119
  readonly security: "definer";
2120
+ }, {
2121
+ readonly name: "levels_of";
2122
+ readonly args: "p_user_id uuid, p_ids uuid[]";
2123
+ readonly returns: "jsonb";
2124
+ readonly security: "definer";
2105
2125
  }, {
2106
2126
  readonly name: "levels_raised_by_a_less_specific_rung";
2107
2127
  readonly args: "";
@@ -2147,6 +2167,11 @@ declare const STORE_DOORS: readonly [{
2147
2167
  readonly args: "p_organization_id uuid, p_table_id uuid";
2148
2168
  readonly returns: "boolean";
2149
2169
  readonly security: "definer";
2170
+ }, {
2171
+ readonly name: "member_personal_tables";
2172
+ readonly args: "p_organization_id uuid, p_person uuid";
2173
+ readonly returns: "jsonb";
2174
+ readonly security: "definer";
2150
2175
  }, {
2151
2176
  readonly name: "merge_field_kernel_id";
2152
2177
  readonly args: "";
@@ -2702,6 +2727,16 @@ declare const STORE_DOORS: readonly [{
2702
2727
  readonly args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text";
2703
2728
  readonly returns: "jsonb";
2704
2729
  readonly security: "definer";
2730
+ }, {
2731
+ readonly name: "read_mask_at";
2732
+ readonly args: "p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text";
2733
+ readonly returns: "jsonb";
2734
+ readonly security: "definer";
2735
+ }, {
2736
+ readonly name: "read_mask_for";
2737
+ readonly args: "p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text";
2738
+ readonly returns: "jsonb";
2739
+ readonly security: "definer";
2705
2740
  }, {
2706
2741
  readonly name: "read_paths_outside_the_door";
2707
2742
  readonly args: "";
@@ -2902,6 +2937,11 @@ declare const STORE_DOORS: readonly [{
2902
2937
  readonly args: "p_row custom.record";
2903
2938
  readonly returns: "jsonb";
2904
2939
  readonly security: "invoker";
2940
+ }, {
2941
+ readonly name: "record_values_step";
2942
+ readonly args: "p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb";
2943
+ readonly returns: "record";
2944
+ readonly security: "invoker";
2905
2945
  }, {
2906
2946
  readonly name: "record_values_versioned";
2907
2947
  readonly args: "p_organization_id uuid, p_record_id uuid";
@@ -3014,7 +3054,7 @@ declare const STORE_DOORS: readonly [{
3014
3054
  readonly security: "definer";
3015
3055
  }, {
3016
3056
  readonly name: "resolve_context";
3017
- readonly args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[]";
3057
+ readonly args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]";
3018
3058
  readonly returns: "jsonb";
3019
3059
  readonly security: "definer";
3020
3060
  }, {
@@ -3042,6 +3082,11 @@ declare const STORE_DOORS: readonly [{
3042
3082
  readonly args: "p_organization_id uuid, p_table_id uuid";
3043
3083
  readonly returns: "jsonb";
3044
3084
  readonly security: "definer";
3085
+ }, {
3086
+ readonly name: "row_sits_in_a_personal_table";
3087
+ readonly args: "p_type text, p_organization_id uuid, p_id uuid";
3088
+ readonly returns: "boolean";
3089
+ readonly security: "invoker";
3045
3090
  }, {
3046
3091
  readonly name: "rule_applies";
3047
3092
  readonly args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid";
@@ -3502,6 +3547,11 @@ declare const STORE_DOORS: readonly [{
3502
3547
  readonly args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb";
3503
3548
  readonly returns: "jsonb";
3504
3549
  readonly security: "definer";
3550
+ }, {
3551
+ readonly name: "table_transfer_owner";
3552
+ readonly args: "p_table_id uuid, p_to_person uuid, p_reason text";
3553
+ readonly returns: "jsonb";
3554
+ readonly security: "definer";
3505
3555
  }, {
3506
3556
  readonly name: "table_type_field";
3507
3557
  readonly args: "p_organization_id uuid, p_table_id uuid";
@@ -3647,6 +3697,16 @@ declare const STORE_DOORS: readonly [{
3647
3697
  readonly args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb";
3648
3698
  readonly returns: "jsonb";
3649
3699
  readonly security: "invoker";
3700
+ }, {
3701
+ readonly name: "view_look_read";
3702
+ readonly args: "p_organization_id uuid, p_table_id uuid";
3703
+ readonly returns: "jsonb";
3704
+ readonly security: "definer";
3705
+ }, {
3706
+ readonly name: "view_look_set";
3707
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb";
3708
+ readonly returns: "jsonb";
3709
+ readonly security: "definer";
3650
3710
  }, {
3651
3711
  readonly name: "view_record_order_set";
3652
3712
  readonly args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]";
@@ -4197,7 +4257,7 @@ declare const STORE_KNOBS: readonly [{
4197
4257
  */
4198
4258
  declare const STORE_REFUSAL_CODES: readonly [{
4199
4259
  readonly code: "02000";
4200
- readonly raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,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,enrich_pin,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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
4260
+ readonly raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,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,enrich_pin,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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
4201
4261
  }, {
4202
4262
  readonly code: "0A000";
4203
4263
  readonly raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,rule_filter_node_sql,work_assign";
@@ -4206,7 +4266,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4206
4266
  readonly raised_by: "context_resolve";
4207
4267
  }, {
4208
4268
  readonly code: "22004";
4209
- readonly raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,work_approval_decide,work_approval_request,work_template_declare";
4269
+ readonly raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,work_approval_decide,work_approval_request,work_template_declare";
4210
4270
  }, {
4211
4271
  readonly code: "22007";
4212
4272
  readonly raised_by: "agg_parse_moment,dashboard_window_sql";
@@ -4215,10 +4275,10 @@ declare const STORE_REFUSAL_CODES: readonly [{
4215
4275
  readonly raised_by: "formula_eval,rule_eval,rule_sql_op";
4216
4276
  }, {
4217
4277
  readonly code: "22023";
4218
- readonly raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_webhook_declare,view_declare,view_keys_check,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold";
4278
+ readonly raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold";
4219
4279
  }, {
4220
4280
  readonly code: "23503";
4221
- readonly raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate";
4281
+ readonly raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate";
4222
4282
  }, {
4223
4283
  readonly code: "23505";
4224
4284
  readonly raised_by: "_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold";
@@ -4230,7 +4290,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4230
4290
  readonly raised_by: "has_visibility_at,table_move";
4231
4291
  }, {
4232
4292
  readonly code: "42501";
4233
- readonly raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_webhook_declare,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person";
4293
+ readonly raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person";
4234
4294
  }, {
4235
4295
  readonly code: "42703";
4236
4296
  readonly raised_by: "entity_table,portal_declare";
@@ -10009,6 +10069,18 @@ interface RecordsClient {
10009
10069
  * answer is `null` — nothing asked, nothing invented.
10010
10070
  */
10011
10071
  tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
10072
+ /**
10073
+ * WHICH STORE CURRENTLY WRITES each table — `custom.where_tables_live`.
10074
+ *
10075
+ * This is a batch cutover decision, not a Table's home address: during COPY
10076
+ * mode an older table and its record-store copy share an id, and only this
10077
+ * door knows which one the organization is still using. It is intentionally
10078
+ * unbound from this client's organization because the door derives the answer
10079
+ * from each supplied table and the caller's authority.
10080
+ */
10081
+ tablesLiveWhere(args: {
10082
+ table_ids: Uuid[];
10083
+ }): Promise<RecordsResult<TableLiveLocation[]>>;
10012
10084
  /**
10013
10085
  * WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
10014
10086
  * (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
@@ -10830,6 +10902,29 @@ interface RecordsClient {
10830
10902
  view_id: Uuid;
10831
10903
  layout?: string | null;
10832
10904
  }): Promise<RecordsResult<Uuid>>;
10905
+ /**
10906
+ * THE CALLER'S OWN LOOK AT EACH SAVED VIEW OF A TABLE — `{ "<view id>": { look, updated_at } }`.
10907
+ * A look is the view settings one person chose while looking (a board's grouping, a calendar's
10908
+ * date field, a sort, a filter, hidden columns, widths, the layout), kept for her alone until an
10909
+ * editor saves it onto the view with `viewDeclare` ("Save to view"). Viewer on the Table.
10910
+ */
10911
+ viewLookRead(args: {
10912
+ table_id: Uuid;
10913
+ }): Promise<RecordsResult<Record<string, {
10914
+ look: Record<string, unknown>;
10915
+ updated_at: string;
10916
+ }>>>;
10917
+ /**
10918
+ * KEEP THE CALLER'S OWN LOOK AT ONE VIEW — the whole look, as definition keys (`group_field`,
10919
+ * `date_field`, `sorts`, `where`, `presentation`, `layout`, …; a key set to null hides the view's
10920
+ * own). `look: null` is "Reset to view". The shared view row is never written. Answers the look
10921
+ * as kept (null after a reset).
10922
+ */
10923
+ viewLookSet(args: {
10924
+ table_id: Uuid;
10925
+ view_id: Uuid;
10926
+ look: Record<string, unknown> | null;
10927
+ }): Promise<RecordsResult<Record<string, unknown> | null>>;
10833
10928
  docTemplateSave(args: {
10834
10929
  table_id: Uuid;
10835
10930
  name: string;
@@ -11561,6 +11656,16 @@ interface TableFact {
11561
11656
  /** Whether the person signed in MADE this Table. Never who did. */
11562
11657
  mine: boolean;
11563
11658
  }
11659
+ /**
11660
+ * WHERE A TABLE IS CURRENTLY READ AND WRITTEN during the older-table cutover.
11661
+ * `tableHome` is an address read from one Table record; this applies the
11662
+ * organization's migration switch to a batch of ids, including same-id copies.
11663
+ */
11664
+ interface TableLiveLocation {
11665
+ table_id: Uuid;
11666
+ lives_in: "record" | "older";
11667
+ why: string | null;
11668
+ }
11564
11669
 
11565
11670
  /**
11566
11671
  * THE CLIENT OPERATION LEDGER — how a browser recognises the echo of its own write.
@@ -977,11 +977,21 @@ declare const STORE_DOORS: readonly [{
977
977
  readonly args: "p_field jsonb, p_value jsonb";
978
978
  readonly returns: "jsonb";
979
979
  readonly security: "invoker";
980
+ }, {
981
+ readonly name: "choice_render_plan";
982
+ readonly args: "p_organization_id uuid, p_table_id uuid";
983
+ readonly returns: "jsonb";
984
+ readonly security: "invoker";
980
985
  }, {
981
986
  readonly name: "choice_render_value";
982
987
  readonly args: "p_field jsonb, p_value jsonb";
983
988
  readonly returns: "jsonb";
984
989
  readonly security: "invoker";
990
+ }, {
991
+ readonly name: "choice_render_with";
992
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb";
993
+ readonly returns: "jsonb";
994
+ readonly security: "invoker";
985
995
  }, {
986
996
  readonly name: "choice_slug";
987
997
  readonly args: "p_word text";
@@ -1067,11 +1077,6 @@ declare const STORE_DOORS: readonly [{
1067
1077
  readonly args: "p_bindings jsonb";
1068
1078
  readonly returns: "jsonb";
1069
1079
  readonly security: "definer";
1070
- }, {
1071
- readonly name: "context_resolve";
1072
- readonly args: "p_organization_id uuid, p_bindings jsonb, p_scope_slug text DEFAULT 'scopes'::text";
1073
- readonly returns: "jsonb";
1074
- readonly security: "definer";
1075
1080
  }, {
1076
1081
  readonly name: "context_tag_copy";
1077
1082
  readonly args: "p_organization_id uuid";
@@ -1477,11 +1482,21 @@ declare const STORE_DOORS: readonly [{
1477
1482
  readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb";
1478
1483
  readonly returns: "jsonb";
1479
1484
  readonly security: "invoker";
1485
+ }, {
1486
+ readonly name: "entity_reference_render_with";
1487
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb";
1488
+ readonly returns: "jsonb";
1489
+ readonly security: "invoker";
1480
1490
  }, {
1481
1491
  readonly name: "entity_reference_rows";
1482
1492
  readonly args: "p_organization_id uuid, p_token text, p_ids uuid[]";
1483
1493
  readonly returns: "jsonb";
1484
1494
  readonly security: "invoker";
1495
+ }, {
1496
+ readonly name: "entity_reference_target";
1497
+ readonly args: "p_token text";
1498
+ readonly returns: "jsonb";
1499
+ readonly security: "definer";
1485
1500
  }, {
1486
1501
  readonly name: "entity_reference_words";
1487
1502
  readonly args: "p_organization_id uuid, p_refs jsonb";
@@ -2102,6 +2117,11 @@ declare const STORE_DOORS: readonly [{
2102
2117
  readonly args: "";
2103
2118
  readonly returns: "permission_level";
2104
2119
  readonly security: "definer";
2120
+ }, {
2121
+ readonly name: "levels_of";
2122
+ readonly args: "p_user_id uuid, p_ids uuid[]";
2123
+ readonly returns: "jsonb";
2124
+ readonly security: "definer";
2105
2125
  }, {
2106
2126
  readonly name: "levels_raised_by_a_less_specific_rung";
2107
2127
  readonly args: "";
@@ -2147,6 +2167,11 @@ declare const STORE_DOORS: readonly [{
2147
2167
  readonly args: "p_organization_id uuid, p_table_id uuid";
2148
2168
  readonly returns: "boolean";
2149
2169
  readonly security: "definer";
2170
+ }, {
2171
+ readonly name: "member_personal_tables";
2172
+ readonly args: "p_organization_id uuid, p_person uuid";
2173
+ readonly returns: "jsonb";
2174
+ readonly security: "definer";
2150
2175
  }, {
2151
2176
  readonly name: "merge_field_kernel_id";
2152
2177
  readonly args: "";
@@ -2702,6 +2727,16 @@ declare const STORE_DOORS: readonly [{
2702
2727
  readonly args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text";
2703
2728
  readonly returns: "jsonb";
2704
2729
  readonly security: "definer";
2730
+ }, {
2731
+ readonly name: "read_mask_at";
2732
+ readonly args: "p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text";
2733
+ readonly returns: "jsonb";
2734
+ readonly security: "definer";
2735
+ }, {
2736
+ readonly name: "read_mask_for";
2737
+ readonly args: "p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text";
2738
+ readonly returns: "jsonb";
2739
+ readonly security: "definer";
2705
2740
  }, {
2706
2741
  readonly name: "read_paths_outside_the_door";
2707
2742
  readonly args: "";
@@ -2902,6 +2937,11 @@ declare const STORE_DOORS: readonly [{
2902
2937
  readonly args: "p_row custom.record";
2903
2938
  readonly returns: "jsonb";
2904
2939
  readonly security: "invoker";
2940
+ }, {
2941
+ readonly name: "record_values_step";
2942
+ readonly args: "p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb";
2943
+ readonly returns: "record";
2944
+ readonly security: "invoker";
2905
2945
  }, {
2906
2946
  readonly name: "record_values_versioned";
2907
2947
  readonly args: "p_organization_id uuid, p_record_id uuid";
@@ -3014,7 +3054,7 @@ declare const STORE_DOORS: readonly [{
3014
3054
  readonly security: "definer";
3015
3055
  }, {
3016
3056
  readonly name: "resolve_context";
3017
- readonly args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[]";
3057
+ readonly args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]";
3018
3058
  readonly returns: "jsonb";
3019
3059
  readonly security: "definer";
3020
3060
  }, {
@@ -3042,6 +3082,11 @@ declare const STORE_DOORS: readonly [{
3042
3082
  readonly args: "p_organization_id uuid, p_table_id uuid";
3043
3083
  readonly returns: "jsonb";
3044
3084
  readonly security: "definer";
3085
+ }, {
3086
+ readonly name: "row_sits_in_a_personal_table";
3087
+ readonly args: "p_type text, p_organization_id uuid, p_id uuid";
3088
+ readonly returns: "boolean";
3089
+ readonly security: "invoker";
3045
3090
  }, {
3046
3091
  readonly name: "rule_applies";
3047
3092
  readonly args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid";
@@ -3502,6 +3547,11 @@ declare const STORE_DOORS: readonly [{
3502
3547
  readonly args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb";
3503
3548
  readonly returns: "jsonb";
3504
3549
  readonly security: "definer";
3550
+ }, {
3551
+ readonly name: "table_transfer_owner";
3552
+ readonly args: "p_table_id uuid, p_to_person uuid, p_reason text";
3553
+ readonly returns: "jsonb";
3554
+ readonly security: "definer";
3505
3555
  }, {
3506
3556
  readonly name: "table_type_field";
3507
3557
  readonly args: "p_organization_id uuid, p_table_id uuid";
@@ -3647,6 +3697,16 @@ declare const STORE_DOORS: readonly [{
3647
3697
  readonly args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb";
3648
3698
  readonly returns: "jsonb";
3649
3699
  readonly security: "invoker";
3700
+ }, {
3701
+ readonly name: "view_look_read";
3702
+ readonly args: "p_organization_id uuid, p_table_id uuid";
3703
+ readonly returns: "jsonb";
3704
+ readonly security: "definer";
3705
+ }, {
3706
+ readonly name: "view_look_set";
3707
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb";
3708
+ readonly returns: "jsonb";
3709
+ readonly security: "definer";
3650
3710
  }, {
3651
3711
  readonly name: "view_record_order_set";
3652
3712
  readonly args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]";
@@ -4197,7 +4257,7 @@ declare const STORE_KNOBS: readonly [{
4197
4257
  */
4198
4258
  declare const STORE_REFUSAL_CODES: readonly [{
4199
4259
  readonly code: "02000";
4200
- readonly raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,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,enrich_pin,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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
4260
+ readonly raised_by: "_checklist_instantiate,_portal_config_judge,_portal_invite_payload,_read_record_with,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,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,enrich_pin,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_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
4201
4261
  }, {
4202
4262
  readonly code: "0A000";
4203
4263
  readonly raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,rule_filter_node_sql,work_assign";
@@ -4206,7 +4266,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4206
4266
  readonly raised_by: "context_resolve";
4207
4267
  }, {
4208
4268
  readonly code: "22004";
4209
- readonly raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,work_approval_decide,work_approval_request,work_template_declare";
4269
+ readonly raised_by: "_entity_custom_fields_guard,_portal_config_judge,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,context_tag_copy,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,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,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_graph,record_write_many,relation_carry,relation_halves_repair,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_move,table_share_outside_grant,table_share_outside_invite,value_restore,view_declare,view_designate,view_look_read,view_look_set,work_approval_decide,work_approval_request,work_template_declare";
4210
4270
  }, {
4211
4271
  readonly code: "22007";
4212
4272
  readonly raised_by: "agg_parse_moment,dashboard_window_sql";
@@ -4215,10 +4275,10 @@ declare const STORE_REFUSAL_CODES: readonly [{
4215
4275
  readonly raised_by: "formula_eval,rule_eval,rule_sql_op";
4216
4276
  }, {
4217
4277
  readonly code: "22023";
4218
- readonly raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_webhook_declare,view_declare,view_keys_check,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold";
4278
+ readonly raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_rows,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_transfer_owner,table_webhook_declare,view_declare,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold";
4219
4279
  }, {
4220
4280
  readonly code: "23503";
4221
- readonly raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate";
4281
+ readonly raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate";
4222
4282
  }, {
4223
4283
  readonly code: "23505";
4224
4284
  readonly raised_by: "_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold";
@@ -4230,7 +4290,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4230
4290
  readonly raised_by: "has_visibility_at,table_move";
4231
4291
  }, {
4232
4292
  readonly code: "42501";
4233
- readonly raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_webhook_declare,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person";
4293
+ readonly raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_store_door,agent_table_claim,agg_fields_readable_assert,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,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_transfer_owner,table_webhook_declare,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_tables_live,work_approval_decide,work_approval_read,work_approval_request,work_person";
4234
4294
  }, {
4235
4295
  readonly code: "42703";
4236
4296
  readonly raised_by: "entity_table,portal_declare";
@@ -10009,6 +10069,18 @@ interface RecordsClient {
10009
10069
  * answer is `null` — nothing asked, nothing invented.
10010
10070
  */
10011
10071
  tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
10072
+ /**
10073
+ * WHICH STORE CURRENTLY WRITES each table — `custom.where_tables_live`.
10074
+ *
10075
+ * This is a batch cutover decision, not a Table's home address: during COPY
10076
+ * mode an older table and its record-store copy share an id, and only this
10077
+ * door knows which one the organization is still using. It is intentionally
10078
+ * unbound from this client's organization because the door derives the answer
10079
+ * from each supplied table and the caller's authority.
10080
+ */
10081
+ tablesLiveWhere(args: {
10082
+ table_ids: Uuid[];
10083
+ }): Promise<RecordsResult<TableLiveLocation[]>>;
10012
10084
  /**
10013
10085
  * WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
10014
10086
  * (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
@@ -10830,6 +10902,29 @@ interface RecordsClient {
10830
10902
  view_id: Uuid;
10831
10903
  layout?: string | null;
10832
10904
  }): Promise<RecordsResult<Uuid>>;
10905
+ /**
10906
+ * THE CALLER'S OWN LOOK AT EACH SAVED VIEW OF A TABLE — `{ "<view id>": { look, updated_at } }`.
10907
+ * A look is the view settings one person chose while looking (a board's grouping, a calendar's
10908
+ * date field, a sort, a filter, hidden columns, widths, the layout), kept for her alone until an
10909
+ * editor saves it onto the view with `viewDeclare` ("Save to view"). Viewer on the Table.
10910
+ */
10911
+ viewLookRead(args: {
10912
+ table_id: Uuid;
10913
+ }): Promise<RecordsResult<Record<string, {
10914
+ look: Record<string, unknown>;
10915
+ updated_at: string;
10916
+ }>>>;
10917
+ /**
10918
+ * KEEP THE CALLER'S OWN LOOK AT ONE VIEW — the whole look, as definition keys (`group_field`,
10919
+ * `date_field`, `sorts`, `where`, `presentation`, `layout`, …; a key set to null hides the view's
10920
+ * own). `look: null` is "Reset to view". The shared view row is never written. Answers the look
10921
+ * as kept (null after a reset).
10922
+ */
10923
+ viewLookSet(args: {
10924
+ table_id: Uuid;
10925
+ view_id: Uuid;
10926
+ look: Record<string, unknown> | null;
10927
+ }): Promise<RecordsResult<Record<string, unknown> | null>>;
10833
10928
  docTemplateSave(args: {
10834
10929
  table_id: Uuid;
10835
10930
  name: string;
@@ -11561,6 +11656,16 @@ interface TableFact {
11561
11656
  /** Whether the person signed in MADE this Table. Never who did. */
11562
11657
  mine: boolean;
11563
11658
  }
11659
+ /**
11660
+ * WHERE A TABLE IS CURRENTLY READ AND WRITTEN during the older-table cutover.
11661
+ * `tableHome` is an address read from one Table record; this applies the
11662
+ * organization's migration switch to a batch of ids, including same-id copies.
11663
+ */
11664
+ interface TableLiveLocation {
11665
+ table_id: Uuid;
11666
+ lives_in: "record" | "older";
11667
+ why: string | null;
11668
+ }
11564
11669
 
11565
11670
  /**
11566
11671
  * THE CLIENT OPERATION LEDGER — how a browser recognises the echo of its own write.