@ai-matrx/records 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/core/index.cjs +244 -2
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +27 -3
- package/dist/core/index.d.ts +27 -3
- package/dist/core/index.js +244 -2
- package/dist/core/index.js.map +1 -1
- package/dist/{field-CdHqvIIy.d.cts → field-D0Rr4Cqb.d.cts} +52 -3
- package/dist/{field-CdHqvIIy.d.ts → field-D0Rr4Cqb.d.ts} +52 -3
- package/dist/index.cjs +212 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +126 -3
- package/dist/index.d.ts +126 -3
- package/dist/index.js +212 -2
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +244 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +197 -3
- package/dist/react/index.d.ts +197 -3
- package/dist/react/index.js +244 -2
- package/dist/react/index.js.map +1 -1
- 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.map +1 -1
- package/package.json +1 -1
|
@@ -2260,6 +2260,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2260
2260
|
readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
|
|
2261
2261
|
readonly returns: "integer";
|
|
2262
2262
|
readonly security: "definer";
|
|
2263
|
+
}, {
|
|
2264
|
+
readonly name: "relation_words";
|
|
2265
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value text";
|
|
2266
|
+
readonly returns: "text";
|
|
2267
|
+
readonly security: "definer";
|
|
2268
|
+
}, {
|
|
2269
|
+
readonly name: "relation_words_many";
|
|
2270
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]";
|
|
2271
|
+
readonly returns: "TABLE(record_id uuid, words text)";
|
|
2272
|
+
readonly security: "definer";
|
|
2263
2273
|
}, {
|
|
2264
2274
|
readonly name: "reopen_declared_doors";
|
|
2265
2275
|
readonly args: "";
|
|
@@ -3169,13 +3179,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3169
3179
|
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,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,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";
|
|
3170
3180
|
}, {
|
|
3171
3181
|
readonly code: "23503";
|
|
3172
|
-
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_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";
|
|
3182
|
+
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_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";
|
|
3173
3183
|
}, {
|
|
3174
3184
|
readonly code: "23505";
|
|
3175
3185
|
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold";
|
|
3176
3186
|
}, {
|
|
3177
3187
|
readonly code: "23514";
|
|
3178
|
-
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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_import_rows,migrate_merge,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";
|
|
3188
|
+
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_import_rows,migrate_merge,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";
|
|
3179
3189
|
}, {
|
|
3180
3190
|
readonly code: "40001";
|
|
3181
3191
|
readonly raised_by: "has_visibility_at";
|
|
@@ -3663,6 +3673,31 @@ interface FieldRule {
|
|
|
3663
3673
|
* `custom.field` — the ONE definitions table (FLD-8), organization-scoped, so
|
|
3664
3674
|
* two organizations add different fields to the same standard table.
|
|
3665
3675
|
*/
|
|
3676
|
+
/**
|
|
3677
|
+
* WHICH OF THE OTHER RECORD'S COLUMNS A RELATION SHOWS (REL-DISP, 2026-09-21).
|
|
3678
|
+
*
|
|
3679
|
+
* A Table has ONE stored default reference column — its `title_field` — and until
|
|
3680
|
+
* this existed every relation pointing at that Table could display that column and
|
|
3681
|
+
* nothing else. A Jobs board could read "Maria Chen" but never "Maria Chen —
|
|
3682
|
+
* Rincon", and two columns could not be joined into one string at all.
|
|
3683
|
+
*
|
|
3684
|
+
* ABSENT MEANS THE TABLE'S OWN COLUMN. A field with no `display` resolves exactly
|
|
3685
|
+
* as it did before, so nothing changes for a column nobody has given a spec to.
|
|
3686
|
+
*
|
|
3687
|
+
* The store judges it once, in `custom._display_spec_for`: every column named must
|
|
3688
|
+
* exist on the target Table, and the refusal names the one that does not. It is
|
|
3689
|
+
* resolved by ONE body, `custom._words_for`, which `custom.record_words`,
|
|
3690
|
+
* `custom._card_words`, `custom.relation_words` and `custom.relation_words_many`
|
|
3691
|
+
* are all one-liners onto — so the thirteen store-side readers inherit it too.
|
|
3692
|
+
*
|
|
3693
|
+
* A display column that is itself a relation resolves ONE hop and never a second.
|
|
3694
|
+
*/
|
|
3695
|
+
interface RelationDisplay {
|
|
3696
|
+
/** The target's columns, in the order they are shown. */
|
|
3697
|
+
columns: string[];
|
|
3698
|
+
/** What goes between them. Defaults to a single space. */
|
|
3699
|
+
separator: string;
|
|
3700
|
+
}
|
|
3666
3701
|
interface Field {
|
|
3667
3702
|
id: Uuid;
|
|
3668
3703
|
organization_id: Uuid;
|
|
@@ -3691,6 +3726,8 @@ interface Field {
|
|
|
3691
3726
|
on_target_delete: OnDelete | null;
|
|
3692
3727
|
/** REL-9. The reverse is visible from both ends and is NOT a second Field. */
|
|
3693
3728
|
inverse_key: string | null;
|
|
3729
|
+
/** REL-DISP. Which of the target's columns this one shows. Null = the Table's own. */
|
|
3730
|
+
display: RelationDisplay | null;
|
|
3694
3731
|
source: FieldSource;
|
|
3695
3732
|
source_config: Record<string, unknown>;
|
|
3696
3733
|
/** FLD-9. A Formula declares whether it computes on read or on write. */
|
|
@@ -3818,6 +3855,12 @@ interface NewFieldDeclaration {
|
|
|
3818
3855
|
relation_target?: Uuid;
|
|
3819
3856
|
/** REL-2. What happens to this record when the thing it points at goes. */
|
|
3820
3857
|
on_target_delete?: OnDelete;
|
|
3858
|
+
/**
|
|
3859
|
+
* REL-DISP. Which of the target's columns this one shows, and what joins them.
|
|
3860
|
+
* A bare column name and a plain list are both accepted by the door and
|
|
3861
|
+
* normalised; leaving it out keeps the target Table's own reference column.
|
|
3862
|
+
*/
|
|
3863
|
+
display?: RelationDisplay | string[] | string;
|
|
3821
3864
|
/**
|
|
3822
3865
|
* Presentation and behaviour settings the store carries verbatim — a long
|
|
3823
3866
|
* text's `multiline`, a list's existing options table. The door has always
|
|
@@ -3887,6 +3930,12 @@ interface FieldPatch {
|
|
|
3887
3930
|
/** REL / FLD-11: re-point the column. The old edges are withdrawn by the door. */
|
|
3888
3931
|
relation_target?: Uuid;
|
|
3889
3932
|
on_target_delete?: OnDelete;
|
|
3933
|
+
/**
|
|
3934
|
+
* REL-DISP. Which of the target's columns this one shows. `null` REMOVES the
|
|
3935
|
+
* spec and the column goes back to whatever the table it points at is titled by;
|
|
3936
|
+
* the door refuses it by name on a column that points at nothing.
|
|
3937
|
+
*/
|
|
3938
|
+
display?: RelationDisplay | string[] | string | null;
|
|
3890
3939
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
3891
3940
|
promoted?: boolean;
|
|
3892
3941
|
unique?: boolean;
|
|
@@ -3910,4 +3959,4 @@ interface FieldPatch {
|
|
|
3910
3959
|
compute_on?: ComputeOn;
|
|
3911
3960
|
}
|
|
3912
3961
|
|
|
3913
|
-
export { type MergeFieldModifier as $, ABSENCE_REASONS as A, type Delivery as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type EntityToken as G, FIELD_SENSITIVITIES as H, FIELD_SOURCES as I, FRESHNESS as J, type FieldBehavior as K, type ForbiddenEnvelopeWord as L, type Freshness as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type HiddenFieldNotice as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, KERNEL_TABLES as V, type WriteConflict as W, type KernelTableName as X, MERGE_FIELD_MODIFIERS as Y, MERGE_FIELD_SEMANTIC_TYPES as Z, MERGE_FIELD_SOURCES as _, type TableDisplay as a, type MergeFieldSemanticType as a0, type MergeFieldSource as a1, ON_DELETE as a2, OVERRIDE_POLICIES as a3, type OverridePolicy as a4, PARITY_FIELD_TYPES as a5, PER_VALUE_ACCESS_WORDS as a6, type ParityFieldType as a7, type ParityFieldTypeDescriptor as a8, type PerValueAccessWord as a9, type
|
|
3962
|
+
export { type MergeFieldModifier as $, ABSENCE_REASONS as A, type Delivery as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type EntityToken as G, FIELD_SENSITIVITIES as H, FIELD_SOURCES as I, FRESHNESS as J, type FieldBehavior as K, type ForbiddenEnvelopeWord as L, type Freshness as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type HiddenFieldNotice as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, KERNEL_TABLES as V, type WriteConflict as W, type KernelTableName as X, MERGE_FIELD_MODIFIERS as Y, MERGE_FIELD_SEMANTIC_TYPES as Z, MERGE_FIELD_SOURCES as _, type TableDisplay as a, type MergeFieldSemanticType as a0, type MergeFieldSource as a1, ON_DELETE as a2, OVERRIDE_POLICIES as a3, type OverridePolicy as a4, PARITY_FIELD_TYPES as a5, PER_VALUE_ACCESS_WORDS as a6, type ParityFieldType as a7, type ParityFieldTypeDescriptor as a8, type PerValueAccessWord as a9, type ValueAlternateKey as aA, type ValueEnvelope as aB, type ValueEnvelopeKey as aC, type ValueSource as aD, err as aE, isRecordsErr as aF, ok as aG, type ProvenancePointer as aa, RELATION_BINDINGS as ab, RELATION_CARDINALITIES as ac, RELATION_FLAVORS as ad, RETIRED_ACTOR_WORDS as ae, RULE_NODE_KINDS as af, RULE_USES as ag, type RecordsErrorCode as ah, type RelationBinding as ai, type RelationDisplay as aj, type RetiredActorWord as ak, type RuleNodeKind as al, type RuleUse as am, STORAGE_MODES as an, STORE_DOORS as ao, STORE_KNOBS as ap, STORE_REFUSAL_CODES as aq, type StoreDoorName as ar, type StoreRefusalCode as as, TABLE_DISPLAYS as at, TABLE_ORIGINS as au, TABLE_TYPES as av, type TableOrigin as aw, VALUE_ALTERNATE_KEYS as ax, VALUE_ENVELOPE_KEYS as ay, type ValueAlternate 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 RecordRead as j, type ReadRow as k, type Field as l, type StoredRecord as m, type FieldPatch as n, type RecordRevision as o, type ReadValue as p, type FieldProposal as q, type TableProposal as r, type RecordsError as s, type StaleWriteDetail as t, type PredictedRefusal as u, ACTOR_VOCABULARY as v, type AbsenceReason as w, type Actor as x, COMPUTE_ON as y, CONTEXT_POLICIES as z };
|
|
@@ -2260,6 +2260,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2260
2260
|
readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid";
|
|
2261
2261
|
readonly returns: "integer";
|
|
2262
2262
|
readonly security: "definer";
|
|
2263
|
+
}, {
|
|
2264
|
+
readonly name: "relation_words";
|
|
2265
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_value text";
|
|
2266
|
+
readonly returns: "text";
|
|
2267
|
+
readonly security: "definer";
|
|
2268
|
+
}, {
|
|
2269
|
+
readonly name: "relation_words_many";
|
|
2270
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]";
|
|
2271
|
+
readonly returns: "TABLE(record_id uuid, words text)";
|
|
2272
|
+
readonly security: "definer";
|
|
2263
2273
|
}, {
|
|
2264
2274
|
readonly name: "reopen_declared_doors";
|
|
2265
2275
|
readonly args: "";
|
|
@@ -3169,13 +3179,13 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3169
3179
|
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,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,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";
|
|
3170
3180
|
}, {
|
|
3171
3181
|
readonly code: "23503";
|
|
3172
|
-
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_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";
|
|
3182
|
+
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_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";
|
|
3173
3183
|
}, {
|
|
3174
3184
|
readonly code: "23505";
|
|
3175
3185
|
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold";
|
|
3176
3186
|
}, {
|
|
3177
3187
|
readonly code: "23514";
|
|
3178
|
-
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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_import_rows,migrate_merge,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";
|
|
3188
|
+
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_import_rows,migrate_merge,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";
|
|
3179
3189
|
}, {
|
|
3180
3190
|
readonly code: "40001";
|
|
3181
3191
|
readonly raised_by: "has_visibility_at";
|
|
@@ -3663,6 +3673,31 @@ interface FieldRule {
|
|
|
3663
3673
|
* `custom.field` — the ONE definitions table (FLD-8), organization-scoped, so
|
|
3664
3674
|
* two organizations add different fields to the same standard table.
|
|
3665
3675
|
*/
|
|
3676
|
+
/**
|
|
3677
|
+
* WHICH OF THE OTHER RECORD'S COLUMNS A RELATION SHOWS (REL-DISP, 2026-09-21).
|
|
3678
|
+
*
|
|
3679
|
+
* A Table has ONE stored default reference column — its `title_field` — and until
|
|
3680
|
+
* this existed every relation pointing at that Table could display that column and
|
|
3681
|
+
* nothing else. A Jobs board could read "Maria Chen" but never "Maria Chen —
|
|
3682
|
+
* Rincon", and two columns could not be joined into one string at all.
|
|
3683
|
+
*
|
|
3684
|
+
* ABSENT MEANS THE TABLE'S OWN COLUMN. A field with no `display` resolves exactly
|
|
3685
|
+
* as it did before, so nothing changes for a column nobody has given a spec to.
|
|
3686
|
+
*
|
|
3687
|
+
* The store judges it once, in `custom._display_spec_for`: every column named must
|
|
3688
|
+
* exist on the target Table, and the refusal names the one that does not. It is
|
|
3689
|
+
* resolved by ONE body, `custom._words_for`, which `custom.record_words`,
|
|
3690
|
+
* `custom._card_words`, `custom.relation_words` and `custom.relation_words_many`
|
|
3691
|
+
* are all one-liners onto — so the thirteen store-side readers inherit it too.
|
|
3692
|
+
*
|
|
3693
|
+
* A display column that is itself a relation resolves ONE hop and never a second.
|
|
3694
|
+
*/
|
|
3695
|
+
interface RelationDisplay {
|
|
3696
|
+
/** The target's columns, in the order they are shown. */
|
|
3697
|
+
columns: string[];
|
|
3698
|
+
/** What goes between them. Defaults to a single space. */
|
|
3699
|
+
separator: string;
|
|
3700
|
+
}
|
|
3666
3701
|
interface Field {
|
|
3667
3702
|
id: Uuid;
|
|
3668
3703
|
organization_id: Uuid;
|
|
@@ -3691,6 +3726,8 @@ interface Field {
|
|
|
3691
3726
|
on_target_delete: OnDelete | null;
|
|
3692
3727
|
/** REL-9. The reverse is visible from both ends and is NOT a second Field. */
|
|
3693
3728
|
inverse_key: string | null;
|
|
3729
|
+
/** REL-DISP. Which of the target's columns this one shows. Null = the Table's own. */
|
|
3730
|
+
display: RelationDisplay | null;
|
|
3694
3731
|
source: FieldSource;
|
|
3695
3732
|
source_config: Record<string, unknown>;
|
|
3696
3733
|
/** FLD-9. A Formula declares whether it computes on read or on write. */
|
|
@@ -3818,6 +3855,12 @@ interface NewFieldDeclaration {
|
|
|
3818
3855
|
relation_target?: Uuid;
|
|
3819
3856
|
/** REL-2. What happens to this record when the thing it points at goes. */
|
|
3820
3857
|
on_target_delete?: OnDelete;
|
|
3858
|
+
/**
|
|
3859
|
+
* REL-DISP. Which of the target's columns this one shows, and what joins them.
|
|
3860
|
+
* A bare column name and a plain list are both accepted by the door and
|
|
3861
|
+
* normalised; leaving it out keeps the target Table's own reference column.
|
|
3862
|
+
*/
|
|
3863
|
+
display?: RelationDisplay | string[] | string;
|
|
3821
3864
|
/**
|
|
3822
3865
|
* Presentation and behaviour settings the store carries verbatim — a long
|
|
3823
3866
|
* text's `multiline`, a list's existing options table. The door has always
|
|
@@ -3887,6 +3930,12 @@ interface FieldPatch {
|
|
|
3887
3930
|
/** REL / FLD-11: re-point the column. The old edges are withdrawn by the door. */
|
|
3888
3931
|
relation_target?: Uuid;
|
|
3889
3932
|
on_target_delete?: OnDelete;
|
|
3933
|
+
/**
|
|
3934
|
+
* REL-DISP. Which of the target's columns this one shows. `null` REMOVES the
|
|
3935
|
+
* spec and the column goes back to whatever the table it points at is titled by;
|
|
3936
|
+
* the door refuses it by name on a column that points at nothing.
|
|
3937
|
+
*/
|
|
3938
|
+
display?: RelationDisplay | string[] | string | null;
|
|
3890
3939
|
/** SEAT-SUITES: whether the store builds an index for this column, and a unique one. */
|
|
3891
3940
|
promoted?: boolean;
|
|
3892
3941
|
unique?: boolean;
|
|
@@ -3910,4 +3959,4 @@ interface FieldPatch {
|
|
|
3910
3959
|
compute_on?: ComputeOn;
|
|
3911
3960
|
}
|
|
3912
3961
|
|
|
3913
|
-
export { type MergeFieldModifier as $, ABSENCE_REASONS as A, type Delivery as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type EntityToken as G, FIELD_SENSITIVITIES as H, FIELD_SOURCES as I, FRESHNESS as J, type FieldBehavior as K, type ForbiddenEnvelopeWord as L, type Freshness as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type HiddenFieldNotice as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, KERNEL_TABLES as V, type WriteConflict as W, type KernelTableName as X, MERGE_FIELD_MODIFIERS as Y, MERGE_FIELD_SEMANTIC_TYPES as Z, MERGE_FIELD_SOURCES as _, type TableDisplay as a, type MergeFieldSemanticType as a0, type MergeFieldSource as a1, ON_DELETE as a2, OVERRIDE_POLICIES as a3, type OverridePolicy as a4, PARITY_FIELD_TYPES as a5, PER_VALUE_ACCESS_WORDS as a6, type ParityFieldType as a7, type ParityFieldTypeDescriptor as a8, type PerValueAccessWord as a9, type
|
|
3962
|
+
export { type MergeFieldModifier as $, ABSENCE_REASONS as A, type Delivery as B, type ComputeOn as C, DELIVERIES as D, ENTITY_TOKENS as E, type FieldTypeWord as F, type EntityToken as G, FIELD_SENSITIVITIES as H, FIELD_SOURCES as I, FRESHNESS as J, type FieldBehavior as K, type ForbiddenEnvelopeWord as L, type Freshness as M, type NewFieldDeclaration as N, type OnDelete as O, type PgError as P, type HiddenFieldNotice as Q, type RelationFlavor as R, type StorageMode as S, type TableType as T, type Uuid as U, KERNEL_TABLES as V, type WriteConflict as W, type KernelTableName as X, MERGE_FIELD_MODIFIERS as Y, MERGE_FIELD_SEMANTIC_TYPES as Z, MERGE_FIELD_SOURCES as _, type TableDisplay as a, type MergeFieldSemanticType as a0, type MergeFieldSource as a1, ON_DELETE as a2, OVERRIDE_POLICIES as a3, type OverridePolicy as a4, PARITY_FIELD_TYPES as a5, PER_VALUE_ACCESS_WORDS as a6, type ParityFieldType as a7, type ParityFieldTypeDescriptor as a8, type PerValueAccessWord as a9, type ValueAlternateKey as aA, type ValueEnvelope as aB, type ValueEnvelopeKey as aC, type ValueSource as aD, err as aE, isRecordsErr as aF, ok as aG, type ProvenancePointer as aa, RELATION_BINDINGS as ab, RELATION_CARDINALITIES as ac, RELATION_FLAVORS as ad, RETIRED_ACTOR_WORDS as ae, RULE_NODE_KINDS as af, RULE_USES as ag, type RecordsErrorCode as ah, type RelationBinding as ai, type RelationDisplay as aj, type RetiredActorWord as ak, type RuleNodeKind as al, type RuleUse as am, STORAGE_MODES as an, STORE_DOORS as ao, STORE_KNOBS as ap, STORE_REFUSAL_CODES as aq, type StoreDoorName as ar, type StoreRefusalCode as as, TABLE_DISPLAYS as at, TABLE_ORIGINS as au, TABLE_TYPES as av, type TableOrigin as aw, VALUE_ALTERNATE_KEYS as ax, VALUE_ENVELOPE_KEYS as ay, type ValueAlternate 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 RecordRead as j, type ReadRow as k, type Field as l, type StoredRecord as m, type FieldPatch as n, type RecordRevision as o, type ReadValue as p, type FieldProposal as q, type TableProposal as r, type RecordsError as s, type StaleWriteDetail as t, type PredictedRefusal as u, ACTOR_VOCABULARY as v, type AbsenceReason as w, type Actor as x, COMPUTE_ON as y, CONTEXT_POLICIES as z };
|
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(src_exports, {
|
|
|
26
26
|
CONTEXT_POLICIES: () => CONTEXT_POLICIES,
|
|
27
27
|
DELIVERIES: () => DELIVERIES,
|
|
28
28
|
ENTITY_TOKENS: () => ENTITY_TOKENS,
|
|
29
|
+
FIELD_KINDS: () => FIELD_KINDS,
|
|
29
30
|
FIELD_SENSITIVITIES: () => FIELD_SENSITIVITIES,
|
|
30
31
|
FIELD_SOURCES: () => FIELD_SOURCES,
|
|
31
32
|
FRESHNESS: () => FRESHNESS,
|
|
@@ -63,7 +64,11 @@ __export(src_exports, {
|
|
|
63
64
|
choiceSlug: () => choiceSlug,
|
|
64
65
|
choiceValuesOf: () => choiceValuesOf,
|
|
65
66
|
choicesOf: () => choicesOf,
|
|
67
|
+
coerceTypedAnswer: () => coerceTypedAnswer,
|
|
68
|
+
coerceTypedAnswers: () => coerceTypedAnswers,
|
|
69
|
+
coercionLabel: () => coercionLabel,
|
|
66
70
|
err: () => err,
|
|
71
|
+
fieldKindFor: () => fieldKindFor,
|
|
67
72
|
forgetAllOps: () => forgetAllOps,
|
|
68
73
|
highestLevel: () => highestLevel,
|
|
69
74
|
holdsARetiredChoice: () => holdsARetiredChoice,
|
|
@@ -215,6 +220,209 @@ function looksLikeAnId(value) {
|
|
|
215
220
|
return typeof value === "string" && UUID.test(value);
|
|
216
221
|
}
|
|
217
222
|
|
|
223
|
+
// src/coerce.ts
|
|
224
|
+
var FIELD_KINDS = [
|
|
225
|
+
"attachment",
|
|
226
|
+
"checkbox",
|
|
227
|
+
"currency",
|
|
228
|
+
"datetime",
|
|
229
|
+
"email",
|
|
230
|
+
"formula",
|
|
231
|
+
"json",
|
|
232
|
+
"long_text",
|
|
233
|
+
"lookup",
|
|
234
|
+
"member",
|
|
235
|
+
"multi_select",
|
|
236
|
+
"number",
|
|
237
|
+
"percent",
|
|
238
|
+
"phone",
|
|
239
|
+
"relation",
|
|
240
|
+
"rollup",
|
|
241
|
+
"select",
|
|
242
|
+
"text",
|
|
243
|
+
"url"
|
|
244
|
+
];
|
|
245
|
+
function fieldKindFor(field, kernel) {
|
|
246
|
+
const format = (field.format ?? "").toLowerCase();
|
|
247
|
+
const config = field.config ?? {};
|
|
248
|
+
switch (field.type) {
|
|
249
|
+
case "boolean":
|
|
250
|
+
return "checkbox";
|
|
251
|
+
case "text":
|
|
252
|
+
if (format === "email") return "email";
|
|
253
|
+
if (format === "phone") return "phone";
|
|
254
|
+
if (format === "url") return "url";
|
|
255
|
+
if (format === "json" || config["json"] === true) return "json";
|
|
256
|
+
if (format === "long" || config["multiline"] === true) return "long_text";
|
|
257
|
+
return "text";
|
|
258
|
+
case "range": {
|
|
259
|
+
const kind = String(config["kind"] ?? "number");
|
|
260
|
+
if (kind === "date" || kind === "datetime") return "datetime";
|
|
261
|
+
if (format === "currency") return "currency";
|
|
262
|
+
if (format === "percent" || field.unit === "%") return "percent";
|
|
263
|
+
return "number";
|
|
264
|
+
}
|
|
265
|
+
case "list":
|
|
266
|
+
return field.multi ? "multi_select" : "select";
|
|
267
|
+
case "relation": {
|
|
268
|
+
const parity = String(config["parity"] ?? "");
|
|
269
|
+
if (parity === "attachment" || parity === "member") return parity;
|
|
270
|
+
if (kernel?.file && field.relation_target === kernel.file) return "attachment";
|
|
271
|
+
if (kernel?.person && field.relation_target === kernel.person) return "member";
|
|
272
|
+
return "relation";
|
|
273
|
+
}
|
|
274
|
+
case "formula": {
|
|
275
|
+
const via = config["via"];
|
|
276
|
+
if (via && config["agg"]) return "rollup";
|
|
277
|
+
if (via) return "lookup";
|
|
278
|
+
return "formula";
|
|
279
|
+
}
|
|
280
|
+
default:
|
|
281
|
+
return "text";
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
var TRUE_WORDS = /* @__PURE__ */ new Set(["true", "yes", "y", "1", "\u2713", "x", "checked", "on"]);
|
|
285
|
+
var FALSE_WORDS = /* @__PURE__ */ new Set(["false", "no", "n", "0", "", "unchecked", "off"]);
|
|
286
|
+
function coercionLabel(field) {
|
|
287
|
+
const label = (field.label ?? "").trim();
|
|
288
|
+
if (label !== "") return label;
|
|
289
|
+
const name = (field.name ?? "").trim();
|
|
290
|
+
if (name !== "") return name;
|
|
291
|
+
return field.key.replace(/[_-]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
|
|
292
|
+
}
|
|
293
|
+
function coerceTypedAnswer(field, raw, opts = {}) {
|
|
294
|
+
const label = opts.label ?? coercionLabel(field);
|
|
295
|
+
const text = raw.trim();
|
|
296
|
+
const kind = fieldKindFor(field, opts.kernel);
|
|
297
|
+
if (text === "" && kind !== "checkbox") return { value: null };
|
|
298
|
+
switch (kind) {
|
|
299
|
+
case "checkbox": {
|
|
300
|
+
const word = text.toLowerCase();
|
|
301
|
+
if (TRUE_WORDS.has(word)) return { value: true };
|
|
302
|
+
if (FALSE_WORDS.has(word)) return { value: word === "" ? null : false };
|
|
303
|
+
return {
|
|
304
|
+
refusal: `${label} is a tick box, so it takes yes or no \u2014 \u201C${raw}\u201D is neither. Write TRUE/FALSE, yes/no or 1/0.`
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
case "number":
|
|
308
|
+
case "currency":
|
|
309
|
+
case "percent": {
|
|
310
|
+
const negative = /^\(.*\)$/.test(text);
|
|
311
|
+
const bare = text.replace(/^\(|\)$/g, "").replace(/[\s,]/g, "").replace(/^[^\d.\-+]+/, "").replace(/[^\d.\-+eE]+$/, "");
|
|
312
|
+
const n = Number(bare);
|
|
313
|
+
if (bare === "" || Number.isNaN(n)) {
|
|
314
|
+
return {
|
|
315
|
+
refusal: `${label} holds a number, and \u201C${raw}\u201D is not one. Write digits \u2014 a currency symbol, a percent sign, commas and brackets for a negative are all fine.`
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
return { value: negative ? -n : n };
|
|
319
|
+
}
|
|
320
|
+
case "datetime": {
|
|
321
|
+
const wantsTime = String(field.config?.["kind"] ?? "date") === "datetime";
|
|
322
|
+
const plainDay = /^\s*(\d{4})-(\d{2})-(\d{2})\s*$/.exec(raw);
|
|
323
|
+
if (!wantsTime && plainDay) return { value: `${plainDay[1]}-${plainDay[2]}-${plainDay[3]}` };
|
|
324
|
+
const at = Date.parse(text);
|
|
325
|
+
if (Number.isNaN(at)) {
|
|
326
|
+
return {
|
|
327
|
+
refusal: `${label} holds a date, and \u201C${raw}\u201D is not one this can read. Write it as 2026-09-21, or the way your spreadsheet writes dates.`
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
const parsed = new Date(at);
|
|
331
|
+
if (wantsTime) return { value: parsed.toISOString() };
|
|
332
|
+
const y = parsed.getFullYear();
|
|
333
|
+
const m = String(parsed.getMonth() + 1).padStart(2, "0");
|
|
334
|
+
const d = String(parsed.getDate()).padStart(2, "0");
|
|
335
|
+
return { value: `${y}-${m}-${d}` };
|
|
336
|
+
}
|
|
337
|
+
case "json": {
|
|
338
|
+
try {
|
|
339
|
+
return { value: JSON.parse(text) };
|
|
340
|
+
} catch {
|
|
341
|
+
return {
|
|
342
|
+
refusal: `${label} holds a document, and \u201C${raw}\u201D is not valid JSON. Write the whole object, braces and all.`
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
case "select":
|
|
347
|
+
case "multi_select": {
|
|
348
|
+
if (!opts.options) {
|
|
349
|
+
return {
|
|
350
|
+
refusal: `${label} is a list and its options have not been read yet, so nothing can be matched to \u201C${raw}\u201D. Try again once the column's choices have loaded.`
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
const wanted = kind === "multi_select" ? text.split(/[,;]/).map((w) => w.trim()).filter((w) => w.length > 0) : [text];
|
|
354
|
+
if (wanted.length === 0) return { value: kind === "multi_select" ? [] : null };
|
|
355
|
+
const matched = [];
|
|
356
|
+
const unmatched = [];
|
|
357
|
+
for (const word of wanted) {
|
|
358
|
+
const hit = opts.options.byWord.get(word.toLowerCase());
|
|
359
|
+
if (hit === void 0) unmatched.push(word);
|
|
360
|
+
else matched.push(hit);
|
|
361
|
+
}
|
|
362
|
+
if (unmatched.length > 0) {
|
|
363
|
+
const offered = opts.options.labels.length > 0 ? opts.options.labels.join(", ") : "it has none yet";
|
|
364
|
+
return {
|
|
365
|
+
refusal: `${label} does not have ${unmatched.map((w) => `\u201C${w}\u201D`).join(" or ")} among its options. It offers: ${offered}.`,
|
|
366
|
+
unmatched
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return { value: kind === "multi_select" ? matched : matched[0] };
|
|
370
|
+
}
|
|
371
|
+
// AN IDENTITY IS NOT A WORD. Writing the word would put a string where an
|
|
372
|
+
// id belongs, and every filter, colour and rollup built on that column
|
|
373
|
+
// would stop agreeing with it. So it is refused and the person is told
|
|
374
|
+
// which control does hold it.
|
|
375
|
+
case "member":
|
|
376
|
+
return {
|
|
377
|
+
refusal: `${label} names a person in this organization, so it is chosen rather than typed. Open it and pick them.`
|
|
378
|
+
};
|
|
379
|
+
case "attachment":
|
|
380
|
+
return {
|
|
381
|
+
refusal: `${label} holds a file, which cannot arrive as typed-in text. Open it and attach the file.`
|
|
382
|
+
};
|
|
383
|
+
case "relation":
|
|
384
|
+
return {
|
|
385
|
+
refusal: `${label} points at another record, so it is chosen rather than typed. Open it and pick the record.`
|
|
386
|
+
};
|
|
387
|
+
case "formula":
|
|
388
|
+
case "lookup":
|
|
389
|
+
case "rollup":
|
|
390
|
+
return {
|
|
391
|
+
refusal: `${label} is worked out by the system, so nothing can be written into it.`
|
|
392
|
+
};
|
|
393
|
+
default:
|
|
394
|
+
return { value: raw };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function coerceTypedAnswers(fields, answers, opts = {}) {
|
|
398
|
+
const byKey = new Map(fields.map((f) => [f.key, f]));
|
|
399
|
+
const values = {};
|
|
400
|
+
const refusals = {};
|
|
401
|
+
const unknownKeys = [];
|
|
402
|
+
for (const [key, given] of Object.entries(answers)) {
|
|
403
|
+
const field = byKey.get(key);
|
|
404
|
+
if (!field) {
|
|
405
|
+
unknownKeys.push(key);
|
|
406
|
+
values[key] = given;
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
if (typeof given !== "string") {
|
|
410
|
+
values[key] = given;
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
const opt = {};
|
|
414
|
+
const choices = opts.options?.get(key);
|
|
415
|
+
if (choices) opt.options = choices;
|
|
416
|
+
if (opts.kernel) opt.kernel = opts.kernel;
|
|
417
|
+
const label = opts.labels?.[key];
|
|
418
|
+
if (label) opt.label = label;
|
|
419
|
+
const answered = coerceTypedAnswer(field, given, opt);
|
|
420
|
+
if ("refusal" in answered) refusals[key] = answered.refusal;
|
|
421
|
+
else values[key] = answered.value;
|
|
422
|
+
}
|
|
423
|
+
return { values, refusals, unknownKeys };
|
|
424
|
+
}
|
|
425
|
+
|
|
218
426
|
// src/pipeline.ts
|
|
219
427
|
var PIPELINE_RULE_KINDS = ["moves", "requires", "who", "limit", "entry"];
|
|
220
428
|
var STAGE_RULE_ON_FAIL = ["refuse", "require_approval"];
|
|
@@ -1046,6 +1254,8 @@ var STORE_DOORS = [
|
|
|
1046
1254
|
{ name: "relation_target_ours", args: "p_entity_token text, p_row_id uuid", returns: "jsonb", security: "definer" },
|
|
1047
1255
|
{ name: "relation_targets", args: "p_organization_id uuid, p_record_id uuid, p_via_key text", returns: "SETOF uuid", security: "definer" },
|
|
1048
1256
|
{ name: "relation_uncarry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "integer", security: "definer" },
|
|
1257
|
+
{ name: "relation_words", args: "p_organization_id uuid, p_field_id uuid, p_value text", returns: "text", security: "definer" },
|
|
1258
|
+
{ name: "relation_words_many", args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]", returns: "TABLE(record_id uuid, words text)", security: "definer" },
|
|
1049
1259
|
{ name: "reopen_declared_doors", args: "", returns: "TABLE(reopened text)", security: "definer" },
|
|
1050
1260
|
{ name: "required_epoch", args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid", returns: "bigint", security: "definer" },
|
|
1051
1261
|
{ name: "resolve_first_match", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -1242,9 +1452,9 @@ var STORE_REFUSAL_CODES = [
|
|
|
1242
1452
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
1243
1453
|
{ code: "22012", raised_by: "rule_eval" },
|
|
1244
1454
|
{ 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,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,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" },
|
|
1245
|
-
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_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" },
|
|
1455
|
+
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_display_spec_for,_field_document_for,_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" },
|
|
1246
1456
|
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
1247
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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_import_rows,migrate_merge,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" },
|
|
1457
|
+
{ 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_import_rows,migrate_merge,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" },
|
|
1248
1458
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
1249
1459
|
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_by_ids,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" },
|
|
1250
1460
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|