@ai-matrx/records 0.58.13 → 0.58.15

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";
@@ -1477,11 +1487,21 @@ declare const STORE_DOORS: readonly [{
1477
1487
  readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb";
1478
1488
  readonly returns: "jsonb";
1479
1489
  readonly security: "invoker";
1490
+ }, {
1491
+ readonly name: "entity_reference_render_with";
1492
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb";
1493
+ readonly returns: "jsonb";
1494
+ readonly security: "invoker";
1480
1495
  }, {
1481
1496
  readonly name: "entity_reference_rows";
1482
1497
  readonly args: "p_organization_id uuid, p_token text, p_ids uuid[]";
1483
1498
  readonly returns: "jsonb";
1484
1499
  readonly security: "invoker";
1500
+ }, {
1501
+ readonly name: "entity_reference_target";
1502
+ readonly args: "p_token text";
1503
+ readonly returns: "jsonb";
1504
+ readonly security: "definer";
1485
1505
  }, {
1486
1506
  readonly name: "entity_reference_words";
1487
1507
  readonly args: "p_organization_id uuid, p_refs jsonb";
@@ -2102,6 +2122,11 @@ declare const STORE_DOORS: readonly [{
2102
2122
  readonly args: "";
2103
2123
  readonly returns: "permission_level";
2104
2124
  readonly security: "definer";
2125
+ }, {
2126
+ readonly name: "levels_of";
2127
+ readonly args: "p_user_id uuid, p_ids uuid[]";
2128
+ readonly returns: "jsonb";
2129
+ readonly security: "definer";
2105
2130
  }, {
2106
2131
  readonly name: "levels_raised_by_a_less_specific_rung";
2107
2132
  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
  }, {
@@ -3647,6 +3687,16 @@ declare const STORE_DOORS: readonly [{
3647
3687
  readonly args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb";
3648
3688
  readonly returns: "jsonb";
3649
3689
  readonly security: "invoker";
3690
+ }, {
3691
+ readonly name: "view_look_read";
3692
+ readonly args: "p_organization_id uuid, p_table_id uuid";
3693
+ readonly returns: "jsonb";
3694
+ readonly security: "definer";
3695
+ }, {
3696
+ readonly name: "view_look_set";
3697
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb";
3698
+ readonly returns: "jsonb";
3699
+ readonly security: "definer";
3650
3700
  }, {
3651
3701
  readonly name: "view_record_order_set";
3652
3702
  readonly args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]";
@@ -4197,7 +4247,7 @@ declare const STORE_KNOBS: readonly [{
4197
4247
  */
4198
4248
  declare const STORE_REFUSAL_CODES: readonly [{
4199
4249
  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";
4250
+ 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
4251
  }, {
4202
4252
  readonly code: "0A000";
4203
4253
  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 +4256,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4206
4256
  readonly raised_by: "context_resolve";
4207
4257
  }, {
4208
4258
  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";
4259
+ 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
4260
  }, {
4211
4261
  readonly code: "22007";
4212
4262
  readonly raised_by: "agg_parse_moment,dashboard_window_sql";
@@ -4215,10 +4265,10 @@ declare const STORE_REFUSAL_CODES: readonly [{
4215
4265
  readonly raised_by: "formula_eval,rule_eval,rule_sql_op";
4216
4266
  }, {
4217
4267
  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";
4268
+ 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_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
4269
  }, {
4220
4270
  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";
4271
+ 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
4272
  }, {
4223
4273
  readonly code: "23505";
4224
4274
  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 +4280,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4230
4280
  readonly raised_by: "has_visibility_at,table_move";
4231
4281
  }, {
4232
4282
  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";
4283
+ 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,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,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
4284
  }, {
4235
4285
  readonly code: "42703";
4236
4286
  readonly raised_by: "entity_table,portal_declare";
@@ -10009,6 +10059,18 @@ interface RecordsClient {
10009
10059
  * answer is `null` — nothing asked, nothing invented.
10010
10060
  */
10011
10061
  tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
10062
+ /**
10063
+ * WHICH STORE CURRENTLY WRITES each table — `custom.where_tables_live`.
10064
+ *
10065
+ * This is a batch cutover decision, not a Table's home address: during COPY
10066
+ * mode an older table and its record-store copy share an id, and only this
10067
+ * door knows which one the organization is still using. It is intentionally
10068
+ * unbound from this client's organization because the door derives the answer
10069
+ * from each supplied table and the caller's authority.
10070
+ */
10071
+ tablesLiveWhere(args: {
10072
+ table_ids: Uuid[];
10073
+ }): Promise<RecordsResult<TableLiveLocation[]>>;
10012
10074
  /**
10013
10075
  * WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
10014
10076
  * (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
@@ -10830,6 +10892,29 @@ interface RecordsClient {
10830
10892
  view_id: Uuid;
10831
10893
  layout?: string | null;
10832
10894
  }): Promise<RecordsResult<Uuid>>;
10895
+ /**
10896
+ * THE CALLER'S OWN LOOK AT EACH SAVED VIEW OF A TABLE — `{ "<view id>": { look, updated_at } }`.
10897
+ * A look is the view settings one person chose while looking (a board's grouping, a calendar's
10898
+ * date field, a sort, a filter, hidden columns, widths, the layout), kept for her alone until an
10899
+ * editor saves it onto the view with `viewDeclare` ("Save to view"). Viewer on the Table.
10900
+ */
10901
+ viewLookRead(args: {
10902
+ table_id: Uuid;
10903
+ }): Promise<RecordsResult<Record<string, {
10904
+ look: Record<string, unknown>;
10905
+ updated_at: string;
10906
+ }>>>;
10907
+ /**
10908
+ * KEEP THE CALLER'S OWN LOOK AT ONE VIEW — the whole look, as definition keys (`group_field`,
10909
+ * `date_field`, `sorts`, `where`, `presentation`, `layout`, …; a key set to null hides the view's
10910
+ * own). `look: null` is "Reset to view". The shared view row is never written. Answers the look
10911
+ * as kept (null after a reset).
10912
+ */
10913
+ viewLookSet(args: {
10914
+ table_id: Uuid;
10915
+ view_id: Uuid;
10916
+ look: Record<string, unknown> | null;
10917
+ }): Promise<RecordsResult<Record<string, unknown> | null>>;
10833
10918
  docTemplateSave(args: {
10834
10919
  table_id: Uuid;
10835
10920
  name: string;
@@ -11561,6 +11646,16 @@ interface TableFact {
11561
11646
  /** Whether the person signed in MADE this Table. Never who did. */
11562
11647
  mine: boolean;
11563
11648
  }
11649
+ /**
11650
+ * WHERE A TABLE IS CURRENTLY READ AND WRITTEN during the older-table cutover.
11651
+ * `tableHome` is an address read from one Table record; this applies the
11652
+ * organization's migration switch to a batch of ids, including same-id copies.
11653
+ */
11654
+ interface TableLiveLocation {
11655
+ table_id: Uuid;
11656
+ lives_in: "record" | "older";
11657
+ why: string | null;
11658
+ }
11564
11659
 
11565
11660
  /**
11566
11661
  * 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";
@@ -1477,11 +1487,21 @@ declare const STORE_DOORS: readonly [{
1477
1487
  readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb";
1478
1488
  readonly returns: "jsonb";
1479
1489
  readonly security: "invoker";
1490
+ }, {
1491
+ readonly name: "entity_reference_render_with";
1492
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb";
1493
+ readonly returns: "jsonb";
1494
+ readonly security: "invoker";
1480
1495
  }, {
1481
1496
  readonly name: "entity_reference_rows";
1482
1497
  readonly args: "p_organization_id uuid, p_token text, p_ids uuid[]";
1483
1498
  readonly returns: "jsonb";
1484
1499
  readonly security: "invoker";
1500
+ }, {
1501
+ readonly name: "entity_reference_target";
1502
+ readonly args: "p_token text";
1503
+ readonly returns: "jsonb";
1504
+ readonly security: "definer";
1485
1505
  }, {
1486
1506
  readonly name: "entity_reference_words";
1487
1507
  readonly args: "p_organization_id uuid, p_refs jsonb";
@@ -2102,6 +2122,11 @@ declare const STORE_DOORS: readonly [{
2102
2122
  readonly args: "";
2103
2123
  readonly returns: "permission_level";
2104
2124
  readonly security: "definer";
2125
+ }, {
2126
+ readonly name: "levels_of";
2127
+ readonly args: "p_user_id uuid, p_ids uuid[]";
2128
+ readonly returns: "jsonb";
2129
+ readonly security: "definer";
2105
2130
  }, {
2106
2131
  readonly name: "levels_raised_by_a_less_specific_rung";
2107
2132
  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
  }, {
@@ -3647,6 +3687,16 @@ declare const STORE_DOORS: readonly [{
3647
3687
  readonly args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb";
3648
3688
  readonly returns: "jsonb";
3649
3689
  readonly security: "invoker";
3690
+ }, {
3691
+ readonly name: "view_look_read";
3692
+ readonly args: "p_organization_id uuid, p_table_id uuid";
3693
+ readonly returns: "jsonb";
3694
+ readonly security: "definer";
3695
+ }, {
3696
+ readonly name: "view_look_set";
3697
+ readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb";
3698
+ readonly returns: "jsonb";
3699
+ readonly security: "definer";
3650
3700
  }, {
3651
3701
  readonly name: "view_record_order_set";
3652
3702
  readonly args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]";
@@ -4197,7 +4247,7 @@ declare const STORE_KNOBS: readonly [{
4197
4247
  */
4198
4248
  declare const STORE_REFUSAL_CODES: readonly [{
4199
4249
  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";
4250
+ 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
4251
  }, {
4202
4252
  readonly code: "0A000";
4203
4253
  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 +4256,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4206
4256
  readonly raised_by: "context_resolve";
4207
4257
  }, {
4208
4258
  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";
4259
+ 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
4260
  }, {
4211
4261
  readonly code: "22007";
4212
4262
  readonly raised_by: "agg_parse_moment,dashboard_window_sql";
@@ -4215,10 +4265,10 @@ declare const STORE_REFUSAL_CODES: readonly [{
4215
4265
  readonly raised_by: "formula_eval,rule_eval,rule_sql_op";
4216
4266
  }, {
4217
4267
  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";
4268
+ 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_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
4269
  }, {
4220
4270
  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";
4271
+ 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
4272
  }, {
4223
4273
  readonly code: "23505";
4224
4274
  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 +4280,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
4230
4280
  readonly raised_by: "has_visibility_at,table_move";
4231
4281
  }, {
4232
4282
  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";
4283
+ 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,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,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
4284
  }, {
4235
4285
  readonly code: "42703";
4236
4286
  readonly raised_by: "entity_table,portal_declare";
@@ -10009,6 +10059,18 @@ interface RecordsClient {
10009
10059
  * answer is `null` — nothing asked, nothing invented.
10010
10060
  */
10011
10061
  tableFacts(): Promise<RecordsResult<TableFact[] | null>>;
10062
+ /**
10063
+ * WHICH STORE CURRENTLY WRITES each table — `custom.where_tables_live`.
10064
+ *
10065
+ * This is a batch cutover decision, not a Table's home address: during COPY
10066
+ * mode an older table and its record-store copy share an id, and only this
10067
+ * door knows which one the organization is still using. It is intentionally
10068
+ * unbound from this client's organization because the door derives the answer
10069
+ * from each supplied table and the caller's authority.
10070
+ */
10071
+ tablesLiveWhere(args: {
10072
+ table_ids: Uuid[];
10073
+ }): Promise<RecordsResult<TableLiveLocation[]>>;
10012
10074
  /**
10013
10075
  * WHICH ORGANIZATION A TABLE LIVES IN, BY NAME, AND WHERE IT MAY GO — `custom.table_home`
10014
10076
  * (SC-1' / SC-1-TAILS). Read FROM THE TABLE, never from the organization the client is bound
@@ -10830,6 +10892,29 @@ interface RecordsClient {
10830
10892
  view_id: Uuid;
10831
10893
  layout?: string | null;
10832
10894
  }): Promise<RecordsResult<Uuid>>;
10895
+ /**
10896
+ * THE CALLER'S OWN LOOK AT EACH SAVED VIEW OF A TABLE — `{ "<view id>": { look, updated_at } }`.
10897
+ * A look is the view settings one person chose while looking (a board's grouping, a calendar's
10898
+ * date field, a sort, a filter, hidden columns, widths, the layout), kept for her alone until an
10899
+ * editor saves it onto the view with `viewDeclare` ("Save to view"). Viewer on the Table.
10900
+ */
10901
+ viewLookRead(args: {
10902
+ table_id: Uuid;
10903
+ }): Promise<RecordsResult<Record<string, {
10904
+ look: Record<string, unknown>;
10905
+ updated_at: string;
10906
+ }>>>;
10907
+ /**
10908
+ * KEEP THE CALLER'S OWN LOOK AT ONE VIEW — the whole look, as definition keys (`group_field`,
10909
+ * `date_field`, `sorts`, `where`, `presentation`, `layout`, …; a key set to null hides the view's
10910
+ * own). `look: null` is "Reset to view". The shared view row is never written. Answers the look
10911
+ * as kept (null after a reset).
10912
+ */
10913
+ viewLookSet(args: {
10914
+ table_id: Uuid;
10915
+ view_id: Uuid;
10916
+ look: Record<string, unknown> | null;
10917
+ }): Promise<RecordsResult<Record<string, unknown> | null>>;
10833
10918
  docTemplateSave(args: {
10834
10919
  table_id: Uuid;
10835
10920
  name: string;
@@ -11561,6 +11646,16 @@ interface TableFact {
11561
11646
  /** Whether the person signed in MADE this Table. Never who did. */
11562
11647
  mine: boolean;
11563
11648
  }
11649
+ /**
11650
+ * WHERE A TABLE IS CURRENTLY READ AND WRITTEN during the older-table cutover.
11651
+ * `tableHome` is an address read from one Table record; this applies the
11652
+ * organization's migration switch to a batch of ids, including same-id copies.
11653
+ */
11654
+ interface TableLiveLocation {
11655
+ table_id: Uuid;
11656
+ lives_in: "record" | "older";
11657
+ why: string | null;
11658
+ }
11564
11659
 
11565
11660
  /**
11566
11661
  * THE CLIENT OPERATION LEDGER — how a browser recognises the echo of its own write.