@ai-matrx/records 0.53.0 → 0.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/core/index.cjs +76 -8
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +56 -9
- package/dist/core/index.d.ts +56 -9
- package/dist/core/index.js +76 -8
- package/dist/core/index.js.map +1 -1
- package/dist/{field-ddMymGEI.d.cts → field-Dr7Ugek4.d.cts} +80 -5
- package/dist/{field-ddMymGEI.d.ts → field-Dr7Ugek4.d.ts} +80 -5
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -3
- package/dist/index.d.ts +34 -3
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +76 -8
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +161 -9
- package/dist/react/index.d.ts +161 -9
- package/dist/react/index.js +76 -8
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs +15 -0
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js +15 -0
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +7 -7
package/dist/react/index.d.cts
CHANGED
|
@@ -1086,6 +1086,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1086
1086
|
readonly args: "";
|
|
1087
1087
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1088
1088
|
readonly security: "invoker";
|
|
1089
|
+
}, {
|
|
1090
|
+
readonly name: "doors_refusing_in_another_doors_name";
|
|
1091
|
+
readonly args: "";
|
|
1092
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1093
|
+
readonly security: "invoker";
|
|
1089
1094
|
}, {
|
|
1090
1095
|
readonly name: "effective_level";
|
|
1091
1096
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1296,6 +1301,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1296
1301
|
readonly args: "p_to jsonb, p_value jsonb";
|
|
1297
1302
|
readonly returns: "jsonb";
|
|
1298
1303
|
readonly security: "invoker";
|
|
1304
|
+
}, {
|
|
1305
|
+
readonly name: "field_words";
|
|
1306
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value jsonb";
|
|
1307
|
+
readonly returns: "text";
|
|
1308
|
+
readonly security: "invoker";
|
|
1299
1309
|
}, {
|
|
1300
1310
|
readonly name: "file_kernel_id";
|
|
1301
1311
|
readonly args: "";
|
|
@@ -1751,6 +1761,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1751
1761
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
|
|
1752
1762
|
readonly returns: "jsonb";
|
|
1753
1763
|
readonly security: "definer";
|
|
1764
|
+
}, {
|
|
1765
|
+
readonly name: "migrate_purge_hard";
|
|
1766
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_compliance_reason text DEFAULT NULL::text, p_chunk integer DEFAULT 200, p_dry_run boolean DEFAULT true";
|
|
1767
|
+
readonly returns: "jsonb";
|
|
1768
|
+
readonly security: "definer";
|
|
1754
1769
|
}, {
|
|
1755
1770
|
readonly name: "migrate_reclass";
|
|
1756
1771
|
readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text";
|
|
@@ -2386,6 +2401,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2386
2401
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
|
|
2387
2402
|
readonly returns: "uuid";
|
|
2388
2403
|
readonly security: "definer";
|
|
2404
|
+
}, {
|
|
2405
|
+
readonly name: "record_write_graph";
|
|
2406
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb";
|
|
2407
|
+
readonly returns: "jsonb";
|
|
2408
|
+
readonly security: "definer";
|
|
2389
2409
|
}, {
|
|
2390
2410
|
readonly name: "record_write_many";
|
|
2391
2411
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]";
|
|
@@ -2776,6 +2796,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2776
2796
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2777
2797
|
readonly returns: "boolean";
|
|
2778
2798
|
readonly security: "invoker";
|
|
2799
|
+
}, {
|
|
2800
|
+
readonly name: "table_is_options_table";
|
|
2801
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2802
|
+
readonly returns: "boolean";
|
|
2803
|
+
readonly security: "invoker";
|
|
2779
2804
|
}, {
|
|
2780
2805
|
readonly name: "table_kernel_id";
|
|
2781
2806
|
readonly args: "";
|
|
@@ -2841,6 +2866,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2841
2866
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2842
2867
|
readonly returns: "text";
|
|
2843
2868
|
readonly security: "definer";
|
|
2869
|
+
}, {
|
|
2870
|
+
readonly name: "table_unique_rule_fields";
|
|
2871
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2872
|
+
readonly returns: "jsonb";
|
|
2873
|
+
readonly security: "invoker";
|
|
2874
|
+
}, {
|
|
2875
|
+
readonly name: "table_work_kind";
|
|
2876
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2877
|
+
readonly returns: "text";
|
|
2878
|
+
readonly security: "invoker";
|
|
2844
2879
|
}, {
|
|
2845
2880
|
readonly name: "tables_at_home";
|
|
2846
2881
|
readonly args: "p_organization_id uuid, p_home_ids uuid[]";
|
|
@@ -3353,7 +3388,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3353
3388
|
readonly raised_by: "context_resolve";
|
|
3354
3389
|
}, {
|
|
3355
3390
|
readonly code: "22004";
|
|
3356
|
-
readonly raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3391
|
+
readonly raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,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_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_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3357
3392
|
}, {
|
|
3358
3393
|
readonly code: "22007";
|
|
3359
3394
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3362,7 +3397,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3362
3397
|
readonly raised_by: "rule_eval";
|
|
3363
3398
|
}, {
|
|
3364
3399
|
readonly code: "22023";
|
|
3365
|
-
readonly raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,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,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
|
|
3400
|
+
readonly raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,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,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
|
|
3366
3401
|
}, {
|
|
3367
3402
|
readonly code: "23503";
|
|
3368
3403
|
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate";
|
|
@@ -3371,13 +3406,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3371
3406
|
readonly raised_by: "_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";
|
|
3372
3407
|
}, {
|
|
3373
3408
|
readonly code: "23514";
|
|
3374
|
-
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,portal_archive,portal_restore,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
3409
|
+
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_relation_halves_agree,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_write_graph,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
3375
3410
|
}, {
|
|
3376
3411
|
readonly code: "40001";
|
|
3377
3412
|
readonly raised_by: "has_visibility_at";
|
|
3378
3413
|
}, {
|
|
3379
3414
|
readonly code: "42501";
|
|
3380
|
-
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,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,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,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,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3415
|
+
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,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,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_purge_hard,migrate_reclass,my_levels,organization_clear,portal_declare,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,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3381
3416
|
}, {
|
|
3382
3417
|
readonly code: "42703";
|
|
3383
3418
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -3782,6 +3817,27 @@ interface RecordDocument {
|
|
|
3782
3817
|
[fieldKey: string]: unknown;
|
|
3783
3818
|
}
|
|
3784
3819
|
/** `custom.record` as the store holds it — the row around the document. */
|
|
3820
|
+
/**
|
|
3821
|
+
* What `custom.record_write_graph` wrote — a parent, the rows that belong to it, and the
|
|
3822
|
+
* edges it stands on, all in one transaction.
|
|
3823
|
+
*
|
|
3824
|
+
* `edges` counts BOTH writers: the edges written through `public.assoc_add` (whose ids are
|
|
3825
|
+
* in `edge_ids`) and the relation targets written through `platform.relation_set`, which
|
|
3826
|
+
* answers a count rather than ids because a relation is one field's worth of targets and
|
|
3827
|
+
* not a list of independent edges. `relations` is that second number on its own, so a
|
|
3828
|
+
* caller can tell them apart instead of subtracting.
|
|
3829
|
+
*/
|
|
3830
|
+
interface RecordGraphWritten {
|
|
3831
|
+
parent_id: Uuid;
|
|
3832
|
+
table_id: Uuid | null;
|
|
3833
|
+
child_ids: Uuid[];
|
|
3834
|
+
edge_ids: Uuid[];
|
|
3835
|
+
children: number;
|
|
3836
|
+
edges: number;
|
|
3837
|
+
relations: number;
|
|
3838
|
+
/** The door's own sentence about what it did. Shown, never re-worded. */
|
|
3839
|
+
how: string;
|
|
3840
|
+
}
|
|
3785
3841
|
interface StoredRecord {
|
|
3786
3842
|
id: Uuid;
|
|
3787
3843
|
organization_id: Uuid;
|
|
@@ -4399,6 +4455,25 @@ interface FieldPatch {
|
|
|
4399
4455
|
* them changed — a roll-up is always `read`.
|
|
4400
4456
|
*/
|
|
4401
4457
|
compute_on?: ComputeOn;
|
|
4458
|
+
/**
|
|
4459
|
+
* FLD-11 / REC-15. RE-AIMING A WORKED-OUT COLUMN: the expression, in the same
|
|
4460
|
+
* shape a Rule uses and read by the same evaluator — `{"op":"concat","args":
|
|
4461
|
+
* [{"field":"note"}]}`. Every `{"field": …}` in it names a live Field of this
|
|
4462
|
+
* organization, or `custom._field_document_for` refuses the whole patch by
|
|
4463
|
+
* name and writes nothing.
|
|
4464
|
+
*
|
|
4465
|
+
* `custom.field_update` carries this in its BEHAVIOUR arm — the arm a type
|
|
4466
|
+
* word opens — so send it WITH the word for what the column is
|
|
4467
|
+
* (`type: "formula"`, or `parity_type` / `plain`). The door's spec builder
|
|
4468
|
+
* reads `coalesce(p_patch -> 'expr', v_old -> 'config' -> 'expr')`, so a
|
|
4469
|
+
* re-type that does not carry one deliberately keeps the expression the
|
|
4470
|
+
* column already had; the settings arm has no `expr` key at all, so `expr`
|
|
4471
|
+
* alone is not a change this door makes. `STORE-TAILS-2` asked for the field
|
|
4472
|
+
* because the one client that needed to re-aim an existing formula had no
|
|
4473
|
+
* typed way to say it and reached for `custom.record_update`, which writes the
|
|
4474
|
+
* Field document under the guards rather than through them.
|
|
4475
|
+
*/
|
|
4476
|
+
expr?: Record<string, unknown>;
|
|
4402
4477
|
}
|
|
4403
4478
|
|
|
4404
4479
|
/** One option, as `_choices` names it and as `optionsOf` returns it. */
|
|
@@ -6593,6 +6668,37 @@ interface RelationCoordinate {
|
|
|
6593
6668
|
/** Which way to walk. `out` is this record's own relation fields. */
|
|
6594
6669
|
direction?: "out" | "in" | "either";
|
|
6595
6670
|
}
|
|
6671
|
+
/** Which store a relation cell's target lives in. Absent means the unified store. */
|
|
6672
|
+
type RelationStore = "record" | "older";
|
|
6673
|
+
/**
|
|
6674
|
+
* Which of the target's columns a relation column shows, and how they join.
|
|
6675
|
+
* A bare name and a list are both shorthand for the object with a single space
|
|
6676
|
+
* as the separator. Null/absent means the target table's own reference column.
|
|
6677
|
+
*/
|
|
6678
|
+
type RelationDisplaySpec = string | readonly string[] | {
|
|
6679
|
+
columns: readonly string[];
|
|
6680
|
+
separator?: string;
|
|
6681
|
+
};
|
|
6682
|
+
/**
|
|
6683
|
+
* The arguments of the ONE resolver, discriminated by store.
|
|
6684
|
+
*
|
|
6685
|
+
* The unified arm takes the FIELD, because that is where its display spec is
|
|
6686
|
+
* declared and judged — `custom._display_of_field` reads it server-side and the
|
|
6687
|
+
* caller never carries it. The older store has no declare-time judge for a
|
|
6688
|
+
* column's format, so its arm carries the spec it read out of the column's own
|
|
6689
|
+
* `metadata.format.options.display`. That asymmetry is real and is not papered
|
|
6690
|
+
* over here: it is the difference between a store that judges a spec when it is
|
|
6691
|
+
* SET and one that has only ever judged a cell when it is READ.
|
|
6692
|
+
*/
|
|
6693
|
+
type RelationWordsManyArgs = {
|
|
6694
|
+
store?: "record";
|
|
6695
|
+
field_id: Uuid;
|
|
6696
|
+
record_ids: Uuid[];
|
|
6697
|
+
} | {
|
|
6698
|
+
store: "older";
|
|
6699
|
+
display?: RelationDisplaySpec | null;
|
|
6700
|
+
record_ids: Uuid[];
|
|
6701
|
+
};
|
|
6596
6702
|
|
|
6597
6703
|
/**
|
|
6598
6704
|
* DYN-14 / DYN-15. An ordered list of merge fields ENDING IN A LITERAL, or the
|
|
@@ -7471,6 +7577,55 @@ interface RecordsClient {
|
|
|
7471
7577
|
rows: RecordDocument[];
|
|
7472
7578
|
ids?: Uuid[];
|
|
7473
7579
|
}): Promise<RecordsResult<Uuid[]>>;
|
|
7580
|
+
/**
|
|
7581
|
+
* A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
|
|
7582
|
+
*
|
|
7583
|
+
* `recordWrite` and `recordWriteMany` are each ONE statement. A screen or a
|
|
7584
|
+
* server path whose unit of work is a GRAPH — an AI artifact and the lines
|
|
7585
|
+
* it produced, an order and its items, a research note and its citations —
|
|
7586
|
+
* could therefore not save it as one thing: a loop is N transactions, and a
|
|
7587
|
+
* failure on row nineteen leaves a parent standing without the lines it
|
|
7588
|
+
* promised.
|
|
7589
|
+
*
|
|
7590
|
+
* `custom.record_write_graph` is one statement, so it is one transaction. It
|
|
7591
|
+
* is NOT a second write path: it calls `custom.record_write_many` for the
|
|
7592
|
+
* rows, `public.assoc_add` for an edge that points OUT of the store (the
|
|
7593
|
+
* message a record was produced by), and `platform.relation_set` for the
|
|
7594
|
+
* parent's own declared relation to its children. Same store switch, same
|
|
7595
|
+
* editor rung on the Table, same value envelope, same undeclared-key guard,
|
|
7596
|
+
* same history rows, same realtime notice.
|
|
7597
|
+
*
|
|
7598
|
+
* ONE REFUSAL REFUSES THE WHOLE GRAPH, BY NAME — the answer says which member
|
|
7599
|
+
* failed and carries the store's own sentence about it, and nothing is
|
|
7600
|
+
* written.
|
|
7601
|
+
*
|
|
7602
|
+
* Every child MUST name a `role`: it is the key of a declared RELATION field
|
|
7603
|
+
* on the parent's Table, and an edge out of a record that names no field is
|
|
7604
|
+
* refused by the store (REL-10 / T7) because without it nothing can read the
|
|
7605
|
+
* relation's delete rule, its cardinality or its organization wall. The order
|
|
7606
|
+
* children are handed in IS the order of the relation.
|
|
7607
|
+
*/
|
|
7608
|
+
recordWriteGraph(args: {
|
|
7609
|
+
table_id: Uuid;
|
|
7610
|
+
parent: RecordDocument;
|
|
7611
|
+
/** Each child: its document, the parent FIELD it fills, and optionally its own Table. */
|
|
7612
|
+
children?: Array<{
|
|
7613
|
+
data: RecordDocument;
|
|
7614
|
+
role: string;
|
|
7615
|
+
table_id?: Uuid;
|
|
7616
|
+
position?: number;
|
|
7617
|
+
}>;
|
|
7618
|
+
/** Edges to things OUTSIDE the store. `direction` defaults to `"in"` — that thing produced this record. */
|
|
7619
|
+
edges?: Array<{
|
|
7620
|
+
entity: string;
|
|
7621
|
+
id: Uuid;
|
|
7622
|
+
direction?: "in" | "out";
|
|
7623
|
+
label?: string;
|
|
7624
|
+
role?: string;
|
|
7625
|
+
position?: number;
|
|
7626
|
+
metadata?: Record<string, unknown>;
|
|
7627
|
+
}>;
|
|
7628
|
+
}): Promise<RecordsResult<RecordGraphWritten>>;
|
|
7474
7629
|
recordUpdate(args: {
|
|
7475
7630
|
record_id: Uuid;
|
|
7476
7631
|
patch: Record<string, unknown>;
|
|
@@ -7663,10 +7818,7 @@ interface RecordsClient {
|
|
|
7663
7818
|
* wherever a grid, board, list or picker resolves more than one chip: the
|
|
7664
7819
|
* per-id lane is what made a page of relation cells a page of requests.
|
|
7665
7820
|
*/
|
|
7666
|
-
relationWordsMany(args:
|
|
7667
|
-
field_id: Uuid;
|
|
7668
|
-
record_ids: Uuid[];
|
|
7669
|
-
}): Promise<RecordsResult<Record<string, string>>>;
|
|
7821
|
+
relationWordsMany(args: RelationWordsManyArgs): Promise<RecordsResult<Record<string, string>>>;
|
|
7670
7822
|
/** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
|
|
7671
7823
|
fieldRetire(args: {
|
|
7672
7824
|
field_id: Uuid;
|
|
@@ -9167,4 +9319,4 @@ declare function useFieldMutation(): UseFieldMutation;
|
|
|
9167
9319
|
*/
|
|
9168
9320
|
declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
|
|
9169
9321
|
|
|
9170
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DeclarableFieldKind, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, err, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, ok, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables };
|
|
9322
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DeclarableFieldKind, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordFilter, type RecordGraphWritten, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, err, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, ok, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1086,6 +1086,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1086
1086
|
readonly args: "";
|
|
1087
1087
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1088
1088
|
readonly security: "invoker";
|
|
1089
|
+
}, {
|
|
1090
|
+
readonly name: "doors_refusing_in_another_doors_name";
|
|
1091
|
+
readonly args: "";
|
|
1092
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1093
|
+
readonly security: "invoker";
|
|
1089
1094
|
}, {
|
|
1090
1095
|
readonly name: "effective_level";
|
|
1091
1096
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1296,6 +1301,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1296
1301
|
readonly args: "p_to jsonb, p_value jsonb";
|
|
1297
1302
|
readonly returns: "jsonb";
|
|
1298
1303
|
readonly security: "invoker";
|
|
1304
|
+
}, {
|
|
1305
|
+
readonly name: "field_words";
|
|
1306
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value jsonb";
|
|
1307
|
+
readonly returns: "text";
|
|
1308
|
+
readonly security: "invoker";
|
|
1299
1309
|
}, {
|
|
1300
1310
|
readonly name: "file_kernel_id";
|
|
1301
1311
|
readonly args: "";
|
|
@@ -1751,6 +1761,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1751
1761
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
|
|
1752
1762
|
readonly returns: "jsonb";
|
|
1753
1763
|
readonly security: "definer";
|
|
1764
|
+
}, {
|
|
1765
|
+
readonly name: "migrate_purge_hard";
|
|
1766
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_compliance_reason text DEFAULT NULL::text, p_chunk integer DEFAULT 200, p_dry_run boolean DEFAULT true";
|
|
1767
|
+
readonly returns: "jsonb";
|
|
1768
|
+
readonly security: "definer";
|
|
1754
1769
|
}, {
|
|
1755
1770
|
readonly name: "migrate_reclass";
|
|
1756
1771
|
readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text";
|
|
@@ -2386,6 +2401,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2386
2401
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
|
|
2387
2402
|
readonly returns: "uuid";
|
|
2388
2403
|
readonly security: "definer";
|
|
2404
|
+
}, {
|
|
2405
|
+
readonly name: "record_write_graph";
|
|
2406
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb";
|
|
2407
|
+
readonly returns: "jsonb";
|
|
2408
|
+
readonly security: "definer";
|
|
2389
2409
|
}, {
|
|
2390
2410
|
readonly name: "record_write_many";
|
|
2391
2411
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]";
|
|
@@ -2776,6 +2796,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2776
2796
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2777
2797
|
readonly returns: "boolean";
|
|
2778
2798
|
readonly security: "invoker";
|
|
2799
|
+
}, {
|
|
2800
|
+
readonly name: "table_is_options_table";
|
|
2801
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2802
|
+
readonly returns: "boolean";
|
|
2803
|
+
readonly security: "invoker";
|
|
2779
2804
|
}, {
|
|
2780
2805
|
readonly name: "table_kernel_id";
|
|
2781
2806
|
readonly args: "";
|
|
@@ -2841,6 +2866,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2841
2866
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2842
2867
|
readonly returns: "text";
|
|
2843
2868
|
readonly security: "definer";
|
|
2869
|
+
}, {
|
|
2870
|
+
readonly name: "table_unique_rule_fields";
|
|
2871
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2872
|
+
readonly returns: "jsonb";
|
|
2873
|
+
readonly security: "invoker";
|
|
2874
|
+
}, {
|
|
2875
|
+
readonly name: "table_work_kind";
|
|
2876
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2877
|
+
readonly returns: "text";
|
|
2878
|
+
readonly security: "invoker";
|
|
2844
2879
|
}, {
|
|
2845
2880
|
readonly name: "tables_at_home";
|
|
2846
2881
|
readonly args: "p_organization_id uuid, p_home_ids uuid[]";
|
|
@@ -3353,7 +3388,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3353
3388
|
readonly raised_by: "context_resolve";
|
|
3354
3389
|
}, {
|
|
3355
3390
|
readonly code: "22004";
|
|
3356
|
-
readonly raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,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_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3391
|
+
readonly raised_by: "_entity_custom_fields_guard,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,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,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_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_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_archive,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3357
3392
|
}, {
|
|
3358
3393
|
readonly code: "22007";
|
|
3359
3394
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3362,7 +3397,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3362
3397
|
readonly raised_by: "rule_eval";
|
|
3363
3398
|
}, {
|
|
3364
3399
|
readonly code: "22023";
|
|
3365
|
-
readonly raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,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,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
|
|
3400
|
+
readonly raised_by: "_booking_availability,_entity_custom_fields_guard,_take_op_id,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,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,portal_declare,provenance_write,query_by_coordinates,query_rollup,read_records_archived,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
|
|
3366
3401
|
}, {
|
|
3367
3402
|
readonly code: "23503";
|
|
3368
3403
|
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate";
|
|
@@ -3371,13 +3406,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3371
3406
|
readonly raised_by: "_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";
|
|
3372
3407
|
}, {
|
|
3373
3408
|
readonly code: "23514";
|
|
3374
|
-
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,portal_archive,portal_restore,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
3409
|
+
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_relation_halves_agree,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_write_graph,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
3375
3410
|
}, {
|
|
3376
3411
|
readonly code: "40001";
|
|
3377
3412
|
readonly raised_by: "has_visibility_at";
|
|
3378
3413
|
}, {
|
|
3379
3414
|
readonly code: "42501";
|
|
3380
|
-
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,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,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,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,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3415
|
+
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,agent_table_claim,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,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_purge_hard,migrate_reclass,my_levels,organization_clear,portal_declare,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,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3381
3416
|
}, {
|
|
3382
3417
|
readonly code: "42703";
|
|
3383
3418
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -3782,6 +3817,27 @@ interface RecordDocument {
|
|
|
3782
3817
|
[fieldKey: string]: unknown;
|
|
3783
3818
|
}
|
|
3784
3819
|
/** `custom.record` as the store holds it — the row around the document. */
|
|
3820
|
+
/**
|
|
3821
|
+
* What `custom.record_write_graph` wrote — a parent, the rows that belong to it, and the
|
|
3822
|
+
* edges it stands on, all in one transaction.
|
|
3823
|
+
*
|
|
3824
|
+
* `edges` counts BOTH writers: the edges written through `public.assoc_add` (whose ids are
|
|
3825
|
+
* in `edge_ids`) and the relation targets written through `platform.relation_set`, which
|
|
3826
|
+
* answers a count rather than ids because a relation is one field's worth of targets and
|
|
3827
|
+
* not a list of independent edges. `relations` is that second number on its own, so a
|
|
3828
|
+
* caller can tell them apart instead of subtracting.
|
|
3829
|
+
*/
|
|
3830
|
+
interface RecordGraphWritten {
|
|
3831
|
+
parent_id: Uuid;
|
|
3832
|
+
table_id: Uuid | null;
|
|
3833
|
+
child_ids: Uuid[];
|
|
3834
|
+
edge_ids: Uuid[];
|
|
3835
|
+
children: number;
|
|
3836
|
+
edges: number;
|
|
3837
|
+
relations: number;
|
|
3838
|
+
/** The door's own sentence about what it did. Shown, never re-worded. */
|
|
3839
|
+
how: string;
|
|
3840
|
+
}
|
|
3785
3841
|
interface StoredRecord {
|
|
3786
3842
|
id: Uuid;
|
|
3787
3843
|
organization_id: Uuid;
|
|
@@ -4399,6 +4455,25 @@ interface FieldPatch {
|
|
|
4399
4455
|
* them changed — a roll-up is always `read`.
|
|
4400
4456
|
*/
|
|
4401
4457
|
compute_on?: ComputeOn;
|
|
4458
|
+
/**
|
|
4459
|
+
* FLD-11 / REC-15. RE-AIMING A WORKED-OUT COLUMN: the expression, in the same
|
|
4460
|
+
* shape a Rule uses and read by the same evaluator — `{"op":"concat","args":
|
|
4461
|
+
* [{"field":"note"}]}`. Every `{"field": …}` in it names a live Field of this
|
|
4462
|
+
* organization, or `custom._field_document_for` refuses the whole patch by
|
|
4463
|
+
* name and writes nothing.
|
|
4464
|
+
*
|
|
4465
|
+
* `custom.field_update` carries this in its BEHAVIOUR arm — the arm a type
|
|
4466
|
+
* word opens — so send it WITH the word for what the column is
|
|
4467
|
+
* (`type: "formula"`, or `parity_type` / `plain`). The door's spec builder
|
|
4468
|
+
* reads `coalesce(p_patch -> 'expr', v_old -> 'config' -> 'expr')`, so a
|
|
4469
|
+
* re-type that does not carry one deliberately keeps the expression the
|
|
4470
|
+
* column already had; the settings arm has no `expr` key at all, so `expr`
|
|
4471
|
+
* alone is not a change this door makes. `STORE-TAILS-2` asked for the field
|
|
4472
|
+
* because the one client that needed to re-aim an existing formula had no
|
|
4473
|
+
* typed way to say it and reached for `custom.record_update`, which writes the
|
|
4474
|
+
* Field document under the guards rather than through them.
|
|
4475
|
+
*/
|
|
4476
|
+
expr?: Record<string, unknown>;
|
|
4402
4477
|
}
|
|
4403
4478
|
|
|
4404
4479
|
/** One option, as `_choices` names it and as `optionsOf` returns it. */
|
|
@@ -6593,6 +6668,37 @@ interface RelationCoordinate {
|
|
|
6593
6668
|
/** Which way to walk. `out` is this record's own relation fields. */
|
|
6594
6669
|
direction?: "out" | "in" | "either";
|
|
6595
6670
|
}
|
|
6671
|
+
/** Which store a relation cell's target lives in. Absent means the unified store. */
|
|
6672
|
+
type RelationStore = "record" | "older";
|
|
6673
|
+
/**
|
|
6674
|
+
* Which of the target's columns a relation column shows, and how they join.
|
|
6675
|
+
* A bare name and a list are both shorthand for the object with a single space
|
|
6676
|
+
* as the separator. Null/absent means the target table's own reference column.
|
|
6677
|
+
*/
|
|
6678
|
+
type RelationDisplaySpec = string | readonly string[] | {
|
|
6679
|
+
columns: readonly string[];
|
|
6680
|
+
separator?: string;
|
|
6681
|
+
};
|
|
6682
|
+
/**
|
|
6683
|
+
* The arguments of the ONE resolver, discriminated by store.
|
|
6684
|
+
*
|
|
6685
|
+
* The unified arm takes the FIELD, because that is where its display spec is
|
|
6686
|
+
* declared and judged — `custom._display_of_field` reads it server-side and the
|
|
6687
|
+
* caller never carries it. The older store has no declare-time judge for a
|
|
6688
|
+
* column's format, so its arm carries the spec it read out of the column's own
|
|
6689
|
+
* `metadata.format.options.display`. That asymmetry is real and is not papered
|
|
6690
|
+
* over here: it is the difference between a store that judges a spec when it is
|
|
6691
|
+
* SET and one that has only ever judged a cell when it is READ.
|
|
6692
|
+
*/
|
|
6693
|
+
type RelationWordsManyArgs = {
|
|
6694
|
+
store?: "record";
|
|
6695
|
+
field_id: Uuid;
|
|
6696
|
+
record_ids: Uuid[];
|
|
6697
|
+
} | {
|
|
6698
|
+
store: "older";
|
|
6699
|
+
display?: RelationDisplaySpec | null;
|
|
6700
|
+
record_ids: Uuid[];
|
|
6701
|
+
};
|
|
6596
6702
|
|
|
6597
6703
|
/**
|
|
6598
6704
|
* DYN-14 / DYN-15. An ordered list of merge fields ENDING IN A LITERAL, or the
|
|
@@ -7471,6 +7577,55 @@ interface RecordsClient {
|
|
|
7471
7577
|
rows: RecordDocument[];
|
|
7472
7578
|
ids?: Uuid[];
|
|
7473
7579
|
}): Promise<RecordsResult<Uuid[]>>;
|
|
7580
|
+
/**
|
|
7581
|
+
* A PARENT, THE EDGES IT STANDS ON AND THE ROWS THAT BELONG TO IT — ALL OR NOTHING.
|
|
7582
|
+
*
|
|
7583
|
+
* `recordWrite` and `recordWriteMany` are each ONE statement. A screen or a
|
|
7584
|
+
* server path whose unit of work is a GRAPH — an AI artifact and the lines
|
|
7585
|
+
* it produced, an order and its items, a research note and its citations —
|
|
7586
|
+
* could therefore not save it as one thing: a loop is N transactions, and a
|
|
7587
|
+
* failure on row nineteen leaves a parent standing without the lines it
|
|
7588
|
+
* promised.
|
|
7589
|
+
*
|
|
7590
|
+
* `custom.record_write_graph` is one statement, so it is one transaction. It
|
|
7591
|
+
* is NOT a second write path: it calls `custom.record_write_many` for the
|
|
7592
|
+
* rows, `public.assoc_add` for an edge that points OUT of the store (the
|
|
7593
|
+
* message a record was produced by), and `platform.relation_set` for the
|
|
7594
|
+
* parent's own declared relation to its children. Same store switch, same
|
|
7595
|
+
* editor rung on the Table, same value envelope, same undeclared-key guard,
|
|
7596
|
+
* same history rows, same realtime notice.
|
|
7597
|
+
*
|
|
7598
|
+
* ONE REFUSAL REFUSES THE WHOLE GRAPH, BY NAME — the answer says which member
|
|
7599
|
+
* failed and carries the store's own sentence about it, and nothing is
|
|
7600
|
+
* written.
|
|
7601
|
+
*
|
|
7602
|
+
* Every child MUST name a `role`: it is the key of a declared RELATION field
|
|
7603
|
+
* on the parent's Table, and an edge out of a record that names no field is
|
|
7604
|
+
* refused by the store (REL-10 / T7) because without it nothing can read the
|
|
7605
|
+
* relation's delete rule, its cardinality or its organization wall. The order
|
|
7606
|
+
* children are handed in IS the order of the relation.
|
|
7607
|
+
*/
|
|
7608
|
+
recordWriteGraph(args: {
|
|
7609
|
+
table_id: Uuid;
|
|
7610
|
+
parent: RecordDocument;
|
|
7611
|
+
/** Each child: its document, the parent FIELD it fills, and optionally its own Table. */
|
|
7612
|
+
children?: Array<{
|
|
7613
|
+
data: RecordDocument;
|
|
7614
|
+
role: string;
|
|
7615
|
+
table_id?: Uuid;
|
|
7616
|
+
position?: number;
|
|
7617
|
+
}>;
|
|
7618
|
+
/** Edges to things OUTSIDE the store. `direction` defaults to `"in"` — that thing produced this record. */
|
|
7619
|
+
edges?: Array<{
|
|
7620
|
+
entity: string;
|
|
7621
|
+
id: Uuid;
|
|
7622
|
+
direction?: "in" | "out";
|
|
7623
|
+
label?: string;
|
|
7624
|
+
role?: string;
|
|
7625
|
+
position?: number;
|
|
7626
|
+
metadata?: Record<string, unknown>;
|
|
7627
|
+
}>;
|
|
7628
|
+
}): Promise<RecordsResult<RecordGraphWritten>>;
|
|
7474
7629
|
recordUpdate(args: {
|
|
7475
7630
|
record_id: Uuid;
|
|
7476
7631
|
patch: Record<string, unknown>;
|
|
@@ -7663,10 +7818,7 @@ interface RecordsClient {
|
|
|
7663
7818
|
* wherever a grid, board, list or picker resolves more than one chip: the
|
|
7664
7819
|
* per-id lane is what made a page of relation cells a page of requests.
|
|
7665
7820
|
*/
|
|
7666
|
-
relationWordsMany(args:
|
|
7667
|
-
field_id: Uuid;
|
|
7668
|
-
record_ids: Uuid[];
|
|
7669
|
-
}): Promise<RecordsResult<Record<string, string>>>;
|
|
7821
|
+
relationWordsMany(args: RelationWordsManyArgs): Promise<RecordsResult<Record<string, string>>>;
|
|
7670
7822
|
/** Take a field off a table. Refuses the title field, the last field, and one another field reads through. */
|
|
7671
7823
|
fieldRetire(args: {
|
|
7672
7824
|
field_id: Uuid;
|
|
@@ -9167,4 +9319,4 @@ declare function useFieldMutation(): UseFieldMutation;
|
|
|
9167
9319
|
*/
|
|
9168
9320
|
declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
|
|
9169
9321
|
|
|
9170
|
-
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DeclarableFieldKind, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordFilter, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, err, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, ok, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables };
|
|
9322
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, ARCHIVE_LANES, ARCHIVE_LANE_LABEL, ARCHIVE_LANE_MEANS, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, type ArchiveLane, type ArchivedDoorRow, type ArchivedRow, type BookingAvailability, type BookingDeclared, type BookingSummary, type BookingWindow, COMPUTE_ON, CONTEXT_POLICIES, type CaptureField, type CaptureFileRef, type CaptureOutcome, type CaptureQuestion, type CaptureQueue, type CaptureQueueCounts, type CaptureQueueOptions, type CaptureQueuePorts, type CaptureQueueStore, type CaptureSheetFace, type CaptureSheetSummary, type CaptureSyncReport, type ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type ChoiceOptions, type CoerceOptions, type Coerced, type CoercedAnswers, type CoercibleField, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DECLARABLE_FIELD_KINDS, DEFAULT_ARCHIVE_LANE, DEFAULT_PORTAL_ARCHIVE_FILTER, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type DeclarableFieldKind, type Delivery, type DigestPreview, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EnrichAlternate, type EnrichCell, type EnrichDeclared, type EnrichDueRow, type EnrichRun, type EnrichSource, type Enrichment, type EnrichmentSummary, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_KINDS, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldKind, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportColumnsDeclared, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, type KernelTargets, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, PIPELINE_RULE_KINDS, PORTAL_ARCHIVE_FILTERS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type Pipeline, type PipelineColumn, type PipelineDeclared, type PipelineGate, type PipelineGatePreview, type PipelineMissingField, type PipelineMoveResult, type PipelineRule, type PipelineRuleKind, type PipelineSpec, type PipelineStage, type PipelineVerdict, type PortalArchiveAnswer, type PortalArchiveFilter, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PortalTableRef, type PredictedRefusal, type ProvenancePointer, type PublishBinding, type QueuedCapture, type QueuedCaptureFile, type QueuedCaptureState, type QuietHours, REFUSALS_WORTH_REPEATING, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordFilter, type RecordGraphWritten, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsChangeSink, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationDisplay, type RelationDisplaySpec, type RelationFlavor, type RelationProperties, type RelationStore, type RelationTarget, type RelationWordsManyArgs, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STAGE_RULE_ENFORCEMENT, STAGE_RULE_ON_FAIL, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type SavedViewRow, type SavedViewSpecIn, type StagePending, type StagePendingOnBoard, type StageRuleEnforcement, type StageRuleOnFail, type StageRuleWarning, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, type SubscriptionSpec, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableArchiveProgress, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, type UseTableArchive, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, archivedByLine, archivedWhen, asPermissionLevel, atLeast, bookingPath, choiceSlug, choiceValuesOf, choicesOf, coerceTypedAnswer, coerceTypedAnswers, coercionLabel, emptyArchiveLine, emptyPortalArchiveLine, err, fieldKindFor, forgetAllOps, highestLevel, holdsARetiredChoice, indexedDbStore, isArchiveLane, isDecided, isOwnOp, isPortalArchiveFilter, isRecordsErr, isTheChosen, looksLikeAnId, mayDrag, measureKey, memoryStore, mintClientKey, mintOpId, ok, openCaptureQueue, optionKey, optionLabel, portalArchiveConsequence, portalConfirmLine, portalPath, portalTitleTypedBack, publicFormPath, rememberedOpCount, sameDocument, scopeChip, stableFilterKey, tableShapeChanged, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTableArchive, useTables };
|