@ai-matrx/records 0.54.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 +49 -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-Ct7_iYEF.d.cts → field-Dr7Ugek4.d.cts} +61 -5
- package/dist/{field-Ct7_iYEF.d.ts → field-Dr7Ugek4.d.ts} +61 -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 +142 -9
- package/dist/react/index.d.ts +142 -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
|
@@ -1083,6 +1083,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1083
1083
|
readonly args: "";
|
|
1084
1084
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1085
1085
|
readonly security: "invoker";
|
|
1086
|
+
}, {
|
|
1087
|
+
readonly name: "doors_refusing_in_another_doors_name";
|
|
1088
|
+
readonly args: "";
|
|
1089
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1090
|
+
readonly security: "invoker";
|
|
1086
1091
|
}, {
|
|
1087
1092
|
readonly name: "effective_level";
|
|
1088
1093
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1293,6 +1298,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1293
1298
|
readonly args: "p_to jsonb, p_value jsonb";
|
|
1294
1299
|
readonly returns: "jsonb";
|
|
1295
1300
|
readonly security: "invoker";
|
|
1301
|
+
}, {
|
|
1302
|
+
readonly name: "field_words";
|
|
1303
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value jsonb";
|
|
1304
|
+
readonly returns: "text";
|
|
1305
|
+
readonly security: "invoker";
|
|
1296
1306
|
}, {
|
|
1297
1307
|
readonly name: "file_kernel_id";
|
|
1298
1308
|
readonly args: "";
|
|
@@ -1748,6 +1758,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1748
1758
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
|
|
1749
1759
|
readonly returns: "jsonb";
|
|
1750
1760
|
readonly security: "definer";
|
|
1761
|
+
}, {
|
|
1762
|
+
readonly name: "migrate_purge_hard";
|
|
1763
|
+
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";
|
|
1764
|
+
readonly returns: "jsonb";
|
|
1765
|
+
readonly security: "definer";
|
|
1751
1766
|
}, {
|
|
1752
1767
|
readonly name: "migrate_reclass";
|
|
1753
1768
|
readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text";
|
|
@@ -2383,6 +2398,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2383
2398
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
|
|
2384
2399
|
readonly returns: "uuid";
|
|
2385
2400
|
readonly security: "definer";
|
|
2401
|
+
}, {
|
|
2402
|
+
readonly name: "record_write_graph";
|
|
2403
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb";
|
|
2404
|
+
readonly returns: "jsonb";
|
|
2405
|
+
readonly security: "definer";
|
|
2386
2406
|
}, {
|
|
2387
2407
|
readonly name: "record_write_many";
|
|
2388
2408
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]";
|
|
@@ -2773,6 +2793,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2773
2793
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2774
2794
|
readonly returns: "boolean";
|
|
2775
2795
|
readonly security: "invoker";
|
|
2796
|
+
}, {
|
|
2797
|
+
readonly name: "table_is_options_table";
|
|
2798
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2799
|
+
readonly returns: "boolean";
|
|
2800
|
+
readonly security: "invoker";
|
|
2776
2801
|
}, {
|
|
2777
2802
|
readonly name: "table_kernel_id";
|
|
2778
2803
|
readonly args: "";
|
|
@@ -2838,6 +2863,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2838
2863
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2839
2864
|
readonly returns: "text";
|
|
2840
2865
|
readonly security: "definer";
|
|
2866
|
+
}, {
|
|
2867
|
+
readonly name: "table_unique_rule_fields";
|
|
2868
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2869
|
+
readonly returns: "jsonb";
|
|
2870
|
+
readonly security: "invoker";
|
|
2871
|
+
}, {
|
|
2872
|
+
readonly name: "table_work_kind";
|
|
2873
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2874
|
+
readonly returns: "text";
|
|
2875
|
+
readonly security: "invoker";
|
|
2841
2876
|
}, {
|
|
2842
2877
|
readonly name: "tables_at_home";
|
|
2843
2878
|
readonly args: "p_organization_id uuid, p_home_ids uuid[]";
|
|
@@ -3350,7 +3385,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3350
3385
|
readonly raised_by: "context_resolve";
|
|
3351
3386
|
}, {
|
|
3352
3387
|
readonly code: "22004";
|
|
3353
|
-
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";
|
|
3388
|
+
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";
|
|
3354
3389
|
}, {
|
|
3355
3390
|
readonly code: "22007";
|
|
3356
3391
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3359,7 +3394,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3359
3394
|
readonly raised_by: "rule_eval";
|
|
3360
3395
|
}, {
|
|
3361
3396
|
readonly code: "22023";
|
|
3362
|
-
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";
|
|
3397
|
+
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";
|
|
3363
3398
|
}, {
|
|
3364
3399
|
readonly code: "23503";
|
|
3365
3400
|
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";
|
|
@@ -3368,13 +3403,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3368
3403
|
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";
|
|
3369
3404
|
}, {
|
|
3370
3405
|
readonly code: "23514";
|
|
3371
|
-
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";
|
|
3406
|
+
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";
|
|
3372
3407
|
}, {
|
|
3373
3408
|
readonly code: "40001";
|
|
3374
3409
|
readonly raised_by: "has_visibility_at";
|
|
3375
3410
|
}, {
|
|
3376
3411
|
readonly code: "42501";
|
|
3377
|
-
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";
|
|
3412
|
+
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";
|
|
3378
3413
|
}, {
|
|
3379
3414
|
readonly code: "42703";
|
|
3380
3415
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -3779,6 +3814,27 @@ interface RecordDocument {
|
|
|
3779
3814
|
[fieldKey: string]: unknown;
|
|
3780
3815
|
}
|
|
3781
3816
|
/** `custom.record` as the store holds it — the row around the document. */
|
|
3817
|
+
/**
|
|
3818
|
+
* What `custom.record_write_graph` wrote — a parent, the rows that belong to it, and the
|
|
3819
|
+
* edges it stands on, all in one transaction.
|
|
3820
|
+
*
|
|
3821
|
+
* `edges` counts BOTH writers: the edges written through `public.assoc_add` (whose ids are
|
|
3822
|
+
* in `edge_ids`) and the relation targets written through `platform.relation_set`, which
|
|
3823
|
+
* answers a count rather than ids because a relation is one field's worth of targets and
|
|
3824
|
+
* not a list of independent edges. `relations` is that second number on its own, so a
|
|
3825
|
+
* caller can tell them apart instead of subtracting.
|
|
3826
|
+
*/
|
|
3827
|
+
interface RecordGraphWritten {
|
|
3828
|
+
parent_id: Uuid;
|
|
3829
|
+
table_id: Uuid | null;
|
|
3830
|
+
child_ids: Uuid[];
|
|
3831
|
+
edge_ids: Uuid[];
|
|
3832
|
+
children: number;
|
|
3833
|
+
edges: number;
|
|
3834
|
+
relations: number;
|
|
3835
|
+
/** The door's own sentence about what it did. Shown, never re-worded. */
|
|
3836
|
+
how: string;
|
|
3837
|
+
}
|
|
3782
3838
|
interface StoredRecord {
|
|
3783
3839
|
id: Uuid;
|
|
3784
3840
|
organization_id: Uuid;
|
|
@@ -4203,4 +4259,4 @@ interface FieldPatch {
|
|
|
4203
4259
|
expr?: Record<string, unknown>;
|
|
4204
4260
|
}
|
|
4205
4261
|
|
|
4206
|
-
export {
|
|
4262
|
+
export { MERGE_FIELD_MODIFIERS as $, ABSENCE_REASONS as A, CONTEXT_POLICIES as B, type ComputeOn as C, DECLARABLE_FIELD_KINDS as D, DELIVERIES as E, type FieldTypeWord as F, type DeclarableFieldKind as G, type Delivery as H, ENTITY_TOKENS as I, type EntityToken as J, FIELD_SENSITIVITIES as K, FIELD_SOURCES as L, FRESHNESS as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type FieldBehavior as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, type ForbiddenEnvelopeWord as V, type WriteConflict as W, type Freshness as X, type HiddenFieldNotice as Y, KERNEL_TABLES as Z, type KernelTableName as _, type TableDisplay as a, MERGE_FIELD_SEMANTIC_TYPES as a0, MERGE_FIELD_SOURCES as a1, type MergeFieldModifier as a2, type MergeFieldSemanticType as a3, type MergeFieldSource as a4, ON_DELETE as a5, OVERRIDE_POLICIES as a6, type OverridePolicy as a7, PARITY_FIELD_TYPES as a8, PER_VALUE_ACCESS_WORDS as a9, VALUE_ALTERNATE_KEYS as aA, VALUE_ENVELOPE_KEYS as aB, type ValueAlternate as aC, type ValueAlternateKey as aD, type ValueEnvelope as aE, type ValueEnvelopeKey as aF, type ValueSource as aG, err as aH, isRecordsErr as aI, ok as aJ, type ParityFieldType as aa, type ParityFieldTypeDescriptor as ab, type PerValueAccessWord as ac, type ProvenancePointer as ad, RELATION_BINDINGS as ae, RELATION_CARDINALITIES as af, RELATION_FLAVORS as ag, RETIRED_ACTOR_WORDS as ah, RULE_NODE_KINDS as ai, RULE_USES as aj, type RecordsErrorCode as ak, type RelationBinding as al, type RelationDisplay as am, type RetiredActorWord as an, type RuleNodeKind as ao, type RuleUse as ap, STORAGE_MODES as aq, STORE_DOORS as ar, STORE_KNOBS as as, STORE_REFUSAL_CODES as at, type StoreDoorName as au, type StoreRefusalCode as av, TABLE_DISPLAYS as aw, TABLE_ORIGINS as ax, TABLE_TYPES as ay, type TableOrigin as az, type FieldSource as b, type FieldRule as c, type FieldSensitivity as d, type ContextPolicy as e, type RelationCardinality as f, type Timestamp as g, type RecordDocument as h, type RecordsResult as i, type RecordGraphWritten as j, type RecordRead as k, type ReadRow as l, type Field as m, type StoredRecord as n, type FieldPatch as o, type RecordRevision as p, type ReadValue as q, type FieldProposal as r, type TableProposal as s, type RecordsError as t, type StaleWriteDetail as u, type PredictedRefusal as v, ACTOR_VOCABULARY as w, type AbsenceReason as x, type Actor as y, COMPUTE_ON as z };
|
|
@@ -1083,6 +1083,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1083
1083
|
readonly args: "";
|
|
1084
1084
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1085
1085
|
readonly security: "invoker";
|
|
1086
|
+
}, {
|
|
1087
|
+
readonly name: "doors_refusing_in_another_doors_name";
|
|
1088
|
+
readonly args: "";
|
|
1089
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
1090
|
+
readonly security: "invoker";
|
|
1086
1091
|
}, {
|
|
1087
1092
|
readonly name: "effective_level";
|
|
1088
1093
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1293,6 +1298,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1293
1298
|
readonly args: "p_to jsonb, p_value jsonb";
|
|
1294
1299
|
readonly returns: "jsonb";
|
|
1295
1300
|
readonly security: "invoker";
|
|
1301
|
+
}, {
|
|
1302
|
+
readonly name: "field_words";
|
|
1303
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value jsonb";
|
|
1304
|
+
readonly returns: "text";
|
|
1305
|
+
readonly security: "invoker";
|
|
1296
1306
|
}, {
|
|
1297
1307
|
readonly name: "file_kernel_id";
|
|
1298
1308
|
readonly args: "";
|
|
@@ -1748,6 +1758,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1748
1758
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true";
|
|
1749
1759
|
readonly returns: "jsonb";
|
|
1750
1760
|
readonly security: "definer";
|
|
1761
|
+
}, {
|
|
1762
|
+
readonly name: "migrate_purge_hard";
|
|
1763
|
+
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";
|
|
1764
|
+
readonly returns: "jsonb";
|
|
1765
|
+
readonly security: "definer";
|
|
1751
1766
|
}, {
|
|
1752
1767
|
readonly name: "migrate_reclass";
|
|
1753
1768
|
readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text";
|
|
@@ -2383,6 +2398,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2383
2398
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb";
|
|
2384
2399
|
readonly returns: "uuid";
|
|
2385
2400
|
readonly security: "definer";
|
|
2401
|
+
}, {
|
|
2402
|
+
readonly name: "record_write_graph";
|
|
2403
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb";
|
|
2404
|
+
readonly returns: "jsonb";
|
|
2405
|
+
readonly security: "definer";
|
|
2386
2406
|
}, {
|
|
2387
2407
|
readonly name: "record_write_many";
|
|
2388
2408
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]";
|
|
@@ -2773,6 +2793,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2773
2793
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2774
2794
|
readonly returns: "boolean";
|
|
2775
2795
|
readonly security: "invoker";
|
|
2796
|
+
}, {
|
|
2797
|
+
readonly name: "table_is_options_table";
|
|
2798
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2799
|
+
readonly returns: "boolean";
|
|
2800
|
+
readonly security: "invoker";
|
|
2776
2801
|
}, {
|
|
2777
2802
|
readonly name: "table_kernel_id";
|
|
2778
2803
|
readonly args: "";
|
|
@@ -2838,6 +2863,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2838
2863
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2839
2864
|
readonly returns: "text";
|
|
2840
2865
|
readonly security: "definer";
|
|
2866
|
+
}, {
|
|
2867
|
+
readonly name: "table_unique_rule_fields";
|
|
2868
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2869
|
+
readonly returns: "jsonb";
|
|
2870
|
+
readonly security: "invoker";
|
|
2871
|
+
}, {
|
|
2872
|
+
readonly name: "table_work_kind";
|
|
2873
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2874
|
+
readonly returns: "text";
|
|
2875
|
+
readonly security: "invoker";
|
|
2841
2876
|
}, {
|
|
2842
2877
|
readonly name: "tables_at_home";
|
|
2843
2878
|
readonly args: "p_organization_id uuid, p_home_ids uuid[]";
|
|
@@ -3350,7 +3385,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3350
3385
|
readonly raised_by: "context_resolve";
|
|
3351
3386
|
}, {
|
|
3352
3387
|
readonly code: "22004";
|
|
3353
|
-
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";
|
|
3388
|
+
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";
|
|
3354
3389
|
}, {
|
|
3355
3390
|
readonly code: "22007";
|
|
3356
3391
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3359,7 +3394,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3359
3394
|
readonly raised_by: "rule_eval";
|
|
3360
3395
|
}, {
|
|
3361
3396
|
readonly code: "22023";
|
|
3362
|
-
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";
|
|
3397
|
+
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";
|
|
3363
3398
|
}, {
|
|
3364
3399
|
readonly code: "23503";
|
|
3365
3400
|
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";
|
|
@@ -3368,13 +3403,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3368
3403
|
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";
|
|
3369
3404
|
}, {
|
|
3370
3405
|
readonly code: "23514";
|
|
3371
|
-
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";
|
|
3406
|
+
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";
|
|
3372
3407
|
}, {
|
|
3373
3408
|
readonly code: "40001";
|
|
3374
3409
|
readonly raised_by: "has_visibility_at";
|
|
3375
3410
|
}, {
|
|
3376
3411
|
readonly code: "42501";
|
|
3377
|
-
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";
|
|
3412
|
+
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";
|
|
3378
3413
|
}, {
|
|
3379
3414
|
readonly code: "42703";
|
|
3380
3415
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -3779,6 +3814,27 @@ interface RecordDocument {
|
|
|
3779
3814
|
[fieldKey: string]: unknown;
|
|
3780
3815
|
}
|
|
3781
3816
|
/** `custom.record` as the store holds it — the row around the document. */
|
|
3817
|
+
/**
|
|
3818
|
+
* What `custom.record_write_graph` wrote — a parent, the rows that belong to it, and the
|
|
3819
|
+
* edges it stands on, all in one transaction.
|
|
3820
|
+
*
|
|
3821
|
+
* `edges` counts BOTH writers: the edges written through `public.assoc_add` (whose ids are
|
|
3822
|
+
* in `edge_ids`) and the relation targets written through `platform.relation_set`, which
|
|
3823
|
+
* answers a count rather than ids because a relation is one field's worth of targets and
|
|
3824
|
+
* not a list of independent edges. `relations` is that second number on its own, so a
|
|
3825
|
+
* caller can tell them apart instead of subtracting.
|
|
3826
|
+
*/
|
|
3827
|
+
interface RecordGraphWritten {
|
|
3828
|
+
parent_id: Uuid;
|
|
3829
|
+
table_id: Uuid | null;
|
|
3830
|
+
child_ids: Uuid[];
|
|
3831
|
+
edge_ids: Uuid[];
|
|
3832
|
+
children: number;
|
|
3833
|
+
edges: number;
|
|
3834
|
+
relations: number;
|
|
3835
|
+
/** The door's own sentence about what it did. Shown, never re-worded. */
|
|
3836
|
+
how: string;
|
|
3837
|
+
}
|
|
3782
3838
|
interface StoredRecord {
|
|
3783
3839
|
id: Uuid;
|
|
3784
3840
|
organization_id: Uuid;
|
|
@@ -4203,4 +4259,4 @@ interface FieldPatch {
|
|
|
4203
4259
|
expr?: Record<string, unknown>;
|
|
4204
4260
|
}
|
|
4205
4261
|
|
|
4206
|
-
export {
|
|
4262
|
+
export { MERGE_FIELD_MODIFIERS as $, ABSENCE_REASONS as A, CONTEXT_POLICIES as B, type ComputeOn as C, DECLARABLE_FIELD_KINDS as D, DELIVERIES as E, type FieldTypeWord as F, type DeclarableFieldKind as G, type Delivery as H, ENTITY_TOKENS as I, type EntityToken as J, FIELD_SENSITIVITIES as K, FIELD_SOURCES as L, FRESHNESS as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type FieldBehavior as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, type ForbiddenEnvelopeWord as V, type WriteConflict as W, type Freshness as X, type HiddenFieldNotice as Y, KERNEL_TABLES as Z, type KernelTableName as _, type TableDisplay as a, MERGE_FIELD_SEMANTIC_TYPES as a0, MERGE_FIELD_SOURCES as a1, type MergeFieldModifier as a2, type MergeFieldSemanticType as a3, type MergeFieldSource as a4, ON_DELETE as a5, OVERRIDE_POLICIES as a6, type OverridePolicy as a7, PARITY_FIELD_TYPES as a8, PER_VALUE_ACCESS_WORDS as a9, VALUE_ALTERNATE_KEYS as aA, VALUE_ENVELOPE_KEYS as aB, type ValueAlternate as aC, type ValueAlternateKey as aD, type ValueEnvelope as aE, type ValueEnvelopeKey as aF, type ValueSource as aG, err as aH, isRecordsErr as aI, ok as aJ, type ParityFieldType as aa, type ParityFieldTypeDescriptor as ab, type PerValueAccessWord as ac, type ProvenancePointer as ad, RELATION_BINDINGS as ae, RELATION_CARDINALITIES as af, RELATION_FLAVORS as ag, RETIRED_ACTOR_WORDS as ah, RULE_NODE_KINDS as ai, RULE_USES as aj, type RecordsErrorCode as ak, type RelationBinding as al, type RelationDisplay as am, type RetiredActorWord as an, type RuleNodeKind as ao, type RuleUse as ap, STORAGE_MODES as aq, STORE_DOORS as ar, STORE_KNOBS as as, STORE_REFUSAL_CODES as at, type StoreDoorName as au, type StoreRefusalCode as av, TABLE_DISPLAYS as aw, TABLE_ORIGINS as ax, TABLE_TYPES as ay, type TableOrigin as az, type FieldSource as b, type FieldRule as c, type FieldSensitivity as d, type ContextPolicy as e, type RelationCardinality as f, type Timestamp as g, type RecordDocument as h, type RecordsResult as i, type RecordGraphWritten as j, type RecordRead as k, type ReadRow as l, type Field as m, type StoredRecord as n, type FieldPatch as o, type RecordRevision as p, type ReadValue as q, type FieldProposal as r, type TableProposal as s, type RecordsError as t, type StaleWriteDetail as u, type PredictedRefusal as v, ACTOR_VOCABULARY as w, type AbsenceReason as x, type Actor as y, COMPUTE_ON as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1109,6 +1109,7 @@ var STORE_DOORS = [
|
|
|
1109
1109
|
{ name: "doors_not_deciding_the_record", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1110
1110
|
{ name: "doors_not_masking_fields", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1111
1111
|
{ name: "doors_not_on_one_ladder", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1112
|
+
{ name: "doors_refusing_in_another_doors_name", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1112
1113
|
{ name: "effective_level", args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text", returns: "permission_level", security: "definer" },
|
|
1113
1114
|
{ name: "enrich_cells", args: "p_organization_id uuid, p_table_id uuid, p_field_keys text[] DEFAULT NULL::text[], p_record_ids uuid[] DEFAULT NULL::uuid[]", returns: "TABLE(record_id uuid, field_key text, agent_owned boolean, value jsonb, value_version integer, actor text, on_behalf_of text, written_at timestamp with time zone, source jsonb, absent_reason text, alternates jsonb, pinned boolean, stale boolean, due_at timestamp with time zone)", security: "definer" },
|
|
1114
1115
|
{ name: "enrich_declare", args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb", returns: "jsonb", security: "definer" },
|
|
@@ -1151,6 +1152,7 @@ var STORE_DOORS = [
|
|
|
1151
1152
|
{ name: "field_rules", args: "p_field_data jsonb", returns: "TABLE(kind text, spec jsonb)", security: "invoker" },
|
|
1152
1153
|
{ name: "field_update", args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb", returns: "uuid", security: "definer" },
|
|
1153
1154
|
{ name: "field_value_convert", args: "p_to jsonb, p_value jsonb", returns: "jsonb", security: "invoker" },
|
|
1155
|
+
{ name: "field_words", args: "p_organization_id uuid, p_field_id uuid, p_value jsonb", returns: "text", security: "invoker" },
|
|
1154
1156
|
{ name: "file_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
1155
1157
|
{ name: "form_declare", args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text", returns: "uuid", security: "definer" },
|
|
1156
1158
|
{ name: "form_notify", args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid", returns: "uuid", security: "invoker" },
|
|
@@ -1242,6 +1244,7 @@ var STORE_DOORS = [
|
|
|
1242
1244
|
{ name: "migrate_merge", args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
1243
1245
|
{ name: "migrate_promote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
1244
1246
|
{ name: "migrate_purge", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
1247
|
+
{ name: "migrate_purge_hard", 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", returns: "jsonb", security: "definer" },
|
|
1245
1248
|
{ name: "migrate_reclass", args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
1246
1249
|
{ name: "migrate_rename", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
1247
1250
|
{ name: "migrate_reparent", args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
@@ -1369,6 +1372,7 @@ var STORE_DOORS = [
|
|
|
1369
1372
|
{ name: "record_values_versioned", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "definer" },
|
|
1370
1373
|
{ name: "record_words", args: "p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text", returns: "text", security: "definer" },
|
|
1371
1374
|
{ name: "record_write", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "uuid", security: "definer" },
|
|
1375
|
+
{ name: "record_write_graph", args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb", returns: "jsonb", security: "definer" },
|
|
1372
1376
|
{ name: "record_write_many", args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]", returns: "uuid[]", security: "definer" },
|
|
1373
1377
|
{ name: "refusals_claiming_a_level_never_asked", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1374
1378
|
{ name: "relation_carry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "uuid", security: "definer" },
|
|
@@ -1447,6 +1451,7 @@ var STORE_DOORS = [
|
|
|
1447
1451
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
1448
1452
|
{ name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
1449
1453
|
{ name: "table_is_live", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
1454
|
+
{ name: "table_is_options_table", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
1450
1455
|
{ name: "table_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
1451
1456
|
{ name: "table_record_ceiling", args: "", returns: "integer", security: "invoker" },
|
|
1452
1457
|
{ name: "table_record_ceiling", args: "p_organization_id uuid", returns: "integer", security: "invoker" },
|
|
@@ -1460,6 +1465,8 @@ var STORE_DOORS = [
|
|
|
1460
1465
|
{ name: "table_stage_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1461
1466
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
1462
1467
|
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
1468
|
+
{ name: "table_unique_rule_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
|
|
1469
|
+
{ name: "table_work_kind", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
1463
1470
|
{ name: "tables_at_home", args: "p_organization_id uuid, p_home_ids uuid[]", returns: "TABLE(table_id uuid, home_record_id uuid, kind text)", security: "definer" },
|
|
1464
1471
|
{ name: "tables_described_without_asking", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
1465
1472
|
{ name: "trg_associations_bump_visibility", args: "", returns: "trigger", security: "definer" },
|
|
@@ -1575,15 +1582,15 @@ var STORE_REFUSAL_CODES = [
|
|
|
1575
1582
|
{ code: "02000", raised_by: "_checklist_instantiate,_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_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_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_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" },
|
|
1576
1583
|
{ code: "0A000", 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,work_assign" },
|
|
1577
1584
|
{ code: "22003", raised_by: "context_resolve" },
|
|
1578
|
-
{ code: "22004", 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" },
|
|
1585
|
+
{ code: "22004", 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" },
|
|
1579
1586
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
1580
1587
|
{ code: "22012", raised_by: "rule_eval" },
|
|
1581
|
-
{ code: "22023", 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" },
|
|
1588
|
+
{ code: "22023", 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" },
|
|
1582
1589
|
{ code: "23503", 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" },
|
|
1583
1590
|
{ code: "23505", 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" },
|
|
1584
|
-
{ code: "23514", 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" },
|
|
1591
|
+
{ code: "23514", 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" },
|
|
1585
1592
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
1586
|
-
{ code: "42501", 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" },
|
|
1593
|
+
{ code: "42501", 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" },
|
|
1587
1594
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
1588
1595
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
1589
1596
|
{ code: "54001", raised_by: "record_delete" },
|