@ai-matrx/records 0.56.0 → 0.57.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 +44 -0
- package/dist/core/index.cjs +200 -26
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +37 -4
- package/dist/core/index.d.ts +37 -4
- package/dist/core/index.js +200 -26
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +105 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +105 -9
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +190 -20
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +386 -13
- package/dist/react/index.d.ts +386 -13
- package/dist/react/index.js +190 -20
- package/dist/react/index.js.map +1 -1
- package/dist/{types-RxnWzAWZ.d.cts → types-Bsamaf-a.d.cts} +348 -12
- package/dist/{types-RxnWzAWZ.d.ts → types-Bsamaf-a.d.ts} +348 -12
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -2243,6 +2243,7 @@ __export(react_exports, {
|
|
|
2243
2243
|
VALUE_ALTERNATE_KEYS: () => VALUE_ALTERNATE_KEYS,
|
|
2244
2244
|
VALUE_ENVELOPE_KEYS: () => VALUE_ENVELOPE_KEYS,
|
|
2245
2245
|
actionRefusals: () => actionRefusals,
|
|
2246
|
+
allowsOtherValues: () => allowsOtherValues,
|
|
2246
2247
|
archivedByLine: () => archivedByLine,
|
|
2247
2248
|
archivedWhen: () => archivedWhen,
|
|
2248
2249
|
asPermissionLevel: () => asPermissionLevel,
|
|
@@ -2285,6 +2286,7 @@ __export(react_exports, {
|
|
|
2285
2286
|
portalPath: () => portalPath,
|
|
2286
2287
|
portalTitleTypedBack: () => portalTitleTypedBack,
|
|
2287
2288
|
publicFormPath: () => publicFormPath,
|
|
2289
|
+
recordChangeTrigger: () => recordChangeTrigger,
|
|
2288
2290
|
rememberedOpCount: () => rememberedOpCount,
|
|
2289
2291
|
sameDocument: () => sameDocument,
|
|
2290
2292
|
scopeChip: () => scopeChip,
|
|
@@ -2302,6 +2304,7 @@ __export(react_exports, {
|
|
|
2302
2304
|
useMyLevels: () => useMyLevels,
|
|
2303
2305
|
useOptionalRecordsClient: () => useOptionalRecordsClient,
|
|
2304
2306
|
useRecord: () => useRecord,
|
|
2307
|
+
useRecordChangeRevision: () => useRecordChangeRevision,
|
|
2305
2308
|
useRecordMutation: () => useRecordMutation,
|
|
2306
2309
|
useRecords: () => useRecords,
|
|
2307
2310
|
useRecordsActor: () => useRecordsActor,
|
|
@@ -2501,6 +2504,15 @@ async function exportPageXlsx(page, labels = {}, sheetLabel = "Records") {
|
|
|
2501
2504
|
}
|
|
2502
2505
|
return XLSX.write(workbook, { type: "array", bookType: "xlsx", compression: true });
|
|
2503
2506
|
}
|
|
2507
|
+
function recordChangeTrigger(tableId, options = {}) {
|
|
2508
|
+
return {
|
|
2509
|
+
type: "event",
|
|
2510
|
+
entity_type: `custom_record:${tableId}`,
|
|
2511
|
+
table_id: tableId,
|
|
2512
|
+
...options.actions && options.actions.length > 0 ? { actions: options.actions } : {},
|
|
2513
|
+
...options.changedFields && options.changedFields.length > 0 ? { changed_fields: options.changedFields } : {}
|
|
2514
|
+
};
|
|
2515
|
+
}
|
|
2504
2516
|
|
|
2505
2517
|
// src/store.generated.ts
|
|
2506
2518
|
var ACTOR_VOCABULARY = ["user", "agent", "system"];
|
|
@@ -2557,6 +2569,48 @@ var RULE_NODE_KINDS = [
|
|
|
2557
2569
|
{ node: "div", evaluated_by: "W1-RULE" },
|
|
2558
2570
|
{ node: "eq", evaluated_by: "W1-RULE" },
|
|
2559
2571
|
{ node: "field", evaluated_by: "W1-RULE" },
|
|
2572
|
+
{ node: "fx.abs", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2573
|
+
{ node: "fx.add", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2574
|
+
{ node: "fx.and", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2575
|
+
{ node: "fx.autonumber", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2576
|
+
{ node: "fx.average", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2577
|
+
{ node: "fx.blank", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2578
|
+
{ node: "fx.concatenate", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2579
|
+
{ node: "fx.contains", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2580
|
+
{ node: "fx.created_time", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2581
|
+
{ node: "fx.dateadd", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2582
|
+
{ node: "fx.datediff", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2583
|
+
{ node: "fx.day", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2584
|
+
{ node: "fx.div", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2585
|
+
{ node: "fx.eq", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2586
|
+
{ node: "fx.gt", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2587
|
+
{ node: "fx.gte", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2588
|
+
{ node: "fx.if", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2589
|
+
{ node: "fx.isblank", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2590
|
+
{ node: "fx.left", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2591
|
+
{ node: "fx.len", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2592
|
+
{ node: "fx.lower", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2593
|
+
{ node: "fx.lt", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2594
|
+
{ node: "fx.lte", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2595
|
+
{ node: "fx.max", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2596
|
+
{ node: "fx.min", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2597
|
+
{ node: "fx.mod", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2598
|
+
{ node: "fx.modified_time", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2599
|
+
{ node: "fx.month", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2600
|
+
{ node: "fx.mul", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2601
|
+
{ node: "fx.ne", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2602
|
+
{ node: "fx.neg", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2603
|
+
{ node: "fx.not", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2604
|
+
{ node: "fx.now", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2605
|
+
{ node: "fx.or", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2606
|
+
{ node: "fx.right", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2607
|
+
{ node: "fx.round", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2608
|
+
{ node: "fx.sub", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2609
|
+
{ node: "fx.sum", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2610
|
+
{ node: "fx.today", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2611
|
+
{ node: "fx.trim", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2612
|
+
{ node: "fx.upper", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2613
|
+
{ node: "fx.year", evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)" },
|
|
2560
2614
|
{ node: "gt", evaluated_by: "W1-RULE" },
|
|
2561
2615
|
{ node: "gte", evaluated_by: "W1-RULE" },
|
|
2562
2616
|
{ node: "length", evaluated_by: "W1-RULE" },
|
|
@@ -2588,6 +2642,8 @@ var KERNEL_TABLES = [
|
|
|
2588
2642
|
];
|
|
2589
2643
|
var STORE_DOORS = [
|
|
2590
2644
|
{ name: "absence_reasons", args: "", returns: "text[]", security: "invoker" },
|
|
2645
|
+
{ name: "action_declare", args: "p_organization_id uuid, p_table_id uuid, p_actions jsonb", returns: "jsonb", security: "definer" },
|
|
2646
|
+
{ name: "action_run", args: "p_organization_id uuid, p_action_id uuid, p_record_ids uuid[]", returns: "jsonb", security: "definer" },
|
|
2591
2647
|
{ name: "actor_vocabulary", args: "", returns: "text[]", security: "invoker" },
|
|
2592
2648
|
{ name: "actor_word", args: "p_declared text", returns: "text", security: "invoker" },
|
|
2593
2649
|
{ name: "addressed_cap", args: "p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "permission_level", security: "definer" },
|
|
@@ -2639,6 +2695,7 @@ var STORE_DOORS = [
|
|
|
2639
2695
|
{ name: "assert_organization_admin", args: "p_organization_id uuid, p_door text, p_what text", returns: "void", security: "invoker" },
|
|
2640
2696
|
{ name: "assert_organization_wall", args: "p_kind text, p_organization_id uuid, p_row jsonb", returns: "void", security: "invoker" },
|
|
2641
2697
|
{ name: "assert_store_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
2698
|
+
{ name: "autonumber_backfill", args: "p_organization_id uuid, p_field_id uuid", returns: "jsonb", security: "definer" },
|
|
2642
2699
|
{ name: "booking_cancel", args: "p_booking_ref text, p_origin text DEFAULT NULL::text", returns: "TABLE(booking_ref text, record_id uuid, slot_key text, state text, message text)", security: "definer" },
|
|
2643
2700
|
{ name: "booking_confirm", args: "p_form_id uuid, p_hold_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text", returns: "TABLE(booking_ref text, record_id uuid, submission_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)", security: "definer" },
|
|
2644
2701
|
{ name: "booking_declare", args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_availability jsonb DEFAULT '{}'::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, p_home_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
@@ -2711,6 +2768,8 @@ var STORE_DOORS = [
|
|
|
2711
2768
|
{ name: "dashboard_stuck", args: "p_organization_id uuid, p_table_id uuid, p_state_key text, p_days integer DEFAULT 14, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 50, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, title text, state text, last_changed_at timestamp with time zone, days_unchanged numeric, measured_from text)", security: "definer" },
|
|
2712
2769
|
{ name: "dashboard_window_sql", args: "p_key text, p_window jsonb", returns: "text", security: "invoker" },
|
|
2713
2770
|
{ name: "dashboards", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(dashboard_id uuid, table_id uuid, name text, blocks jsonb, presentation jsonb, block_count integer, version integer, created_at timestamp with time zone, updated_at timestamp with time zone)", security: "definer" },
|
|
2771
|
+
{ name: "decoration_colors", args: "", returns: "text[]", security: "invoker" },
|
|
2772
|
+
{ name: "decoration_rule_ops", args: "", returns: "TABLE(op text, takes_value boolean, label text)", security: "invoker" },
|
|
2714
2773
|
{ name: "delete_cascade_closure", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid[]", security: "invoker" },
|
|
2715
2774
|
{ name: "delete_preview", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
2716
2775
|
{ name: "delete_rule", args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
@@ -2720,6 +2779,7 @@ var STORE_DOORS = [
|
|
|
2720
2779
|
{ name: "derived_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "invoker" },
|
|
2721
2780
|
{ name: "derived_values", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
2722
2781
|
{ name: "derived_values_of", args: "v_rec custom.record", returns: "jsonb", security: "invoker" },
|
|
2782
|
+
{ name: "display_format_ids", args: "", returns: "text[]", security: "invoker" },
|
|
2723
2783
|
{ name: "doc_content_hash", args: "p_body text", returns: "text", security: "invoker" },
|
|
2724
2784
|
{ name: "doc_format_value", args: "p_field_data jsonb, p_value jsonb", returns: "text", security: "invoker" },
|
|
2725
2785
|
{ name: "doc_letterhead", args: "p_organization_id uuid", returns: "jsonb", security: "definer" },
|
|
@@ -2798,8 +2858,13 @@ var STORE_DOORS = [
|
|
|
2798
2858
|
{ name: "form_slug", args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid", returns: "text", security: "invoker" },
|
|
2799
2859
|
{ name: "form_submit", args: "p_form_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text", returns: "TABLE(submission_id uuid, record_id uuid, state text, message text)", security: "definer" },
|
|
2800
2860
|
{ name: "forms", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(form_id uuid, table_id uuid, title text, slug text, published_at timestamp with time zone, closed_at timestamp with time zone, submission_cap integer, responses bigint, in_table bigint, held bigint, rejected bigint, state text, quarantine_rule_id uuid, notify_rule_id uuid, presentation jsonb)", security: "definer" },
|
|
2861
|
+
{ name: "formula_eval", args: "p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
|
|
2862
|
+
{ name: "formula_node_kinds", args: "", returns: "TABLE(node text, min_args integer, max_args integer, result text, signature text, says text)", security: "invoker" },
|
|
2863
|
+
{ name: "formula_parse", args: "p_organization_id uuid, p_table_id uuid, p_text text", returns: "jsonb", security: "definer" },
|
|
2801
2864
|
{ name: "formula_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "invoker" },
|
|
2802
2865
|
{ name: "freshness_verdict", args: "p_written_at timestamp with time zone, p_ceiling_seconds numeric", returns: "jsonb", security: "definer" },
|
|
2866
|
+
{ name: "grid_layout", args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
2867
|
+
{ name: "grid_layout_check", args: "p_layout jsonb, p_scope text DEFAULT 'view'::text", returns: "jsonb", security: "invoker" },
|
|
2803
2868
|
{ name: "guard_refusals_are_complete", args: "", returns: "TABLE(guard text, said text)", security: "invoker" },
|
|
2804
2869
|
{ name: "has_visibility", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
|
|
2805
2870
|
{ name: "has_visibility_at", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_organization_id uuid DEFAULT NULL::uuid, p_min_version bigint DEFAULT NULL::bigint", returns: "boolean", security: "definer" },
|
|
@@ -2815,6 +2880,7 @@ var STORE_DOORS = [
|
|
|
2815
2880
|
{ name: "history_retention_set", args: "p_organization_id uuid, p_table_id uuid, p_days integer", returns: "integer", security: "definer" },
|
|
2816
2881
|
{ name: "home_add", args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid", returns: "uuid", security: "definer" },
|
|
2817
2882
|
{ name: "home_relations", args: "", returns: "TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)", security: "invoker" },
|
|
2883
|
+
{ name: "hub_changed_by", args: "p_organization_id uuid, p_kind text, p_ids uuid[]", returns: "TABLE(id uuid, at timestamp with time zone, who text)", security: "definer" },
|
|
2818
2884
|
{ name: "inbound_addresses", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
2819
2885
|
{ name: "inbound_declare", args: "p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
2820
2886
|
{ name: "inbound_domain", args: "p_organization_id uuid", returns: "text", security: "invoker" },
|
|
@@ -2883,6 +2949,7 @@ var STORE_DOORS = [
|
|
|
2883
2949
|
{ name: "migrate_promote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
2884
2950
|
{ 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" },
|
|
2885
2951
|
{ 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" },
|
|
2952
|
+
{ name: "migrate_purge_hard_request", args: "p_organization_id uuid, p_table_id uuid, p_compliance_reason text", returns: "void", security: "definer" },
|
|
2886
2953
|
{ 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" },
|
|
2887
2954
|
{ name: "migrate_rename", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
2888
2955
|
{ 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" },
|
|
@@ -2918,6 +2985,7 @@ var STORE_DOORS = [
|
|
|
2918
2985
|
{ name: "pipeline_pending", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
2919
2986
|
{ name: "pipeline_read", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
2920
2987
|
{ name: "pipeline_transition_refusal", args: "p_organization_id uuid, p_record_id uuid, p_to text", returns: "jsonb", security: "definer" },
|
|
2988
|
+
{ name: "pipelines", args: "p_organization_id uuid", returns: "TABLE(table_id uuid, table_name text, stage_field text, stage_label text, stages integer, rules integer, broken text, updated_at timestamp with time zone, updated_by uuid)", security: "definer" },
|
|
2921
2989
|
{ name: "portal_admits", args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid", returns: "boolean", security: "definer" },
|
|
2922
2990
|
{ name: "portal_archive", args: "p_organization_id uuid, p_portal_id uuid, p_confirm_title text, p_reason text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
2923
2991
|
{ name: "portal_card", args: "p_organization_id uuid, p_portal_id uuid", returns: "jsonb", security: "definer" },
|
|
@@ -3015,12 +3083,16 @@ var STORE_DOORS = [
|
|
|
3015
3083
|
{ name: "refusals_claiming_a_level_never_asked", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
3016
3084
|
{ name: "relation_carry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "uuid", security: "definer" },
|
|
3017
3085
|
{ name: "relation_edges_withdraw", args: "p_organization_id uuid, p_field_ids uuid[], p_why text", returns: "integer", security: "definer" },
|
|
3086
|
+
{ name: "relation_halves_disagreements", args: "p_organization_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid", returns: "TABLE(organization_id uuid, record_id uuid, field_key text, field_id uuid, target_id uuid, direction text, remedy text, why text)", security: "definer" },
|
|
3087
|
+
{ name: "relation_halves_repair", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
3088
|
+
{ name: "relation_kernel_record", args: "p_organization_id uuid, p_kernel_table_id uuid, p_id uuid", returns: "uuid", security: "definer" },
|
|
3018
3089
|
{ name: "relation_own", args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid", returns: "uuid", security: "definer" },
|
|
3019
3090
|
{ name: "relation_target_card", args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text", returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)", security: "definer" },
|
|
3020
3091
|
{ name: "relation_target_external", args: "p_connection_token text, p_external_table text, p_external_key text", returns: "jsonb", security: "definer" },
|
|
3021
3092
|
{ name: "relation_target_ours", args: "p_entity_token text, p_row_id uuid", returns: "jsonb", security: "definer" },
|
|
3022
3093
|
{ name: "relation_targets", args: "p_organization_id uuid, p_record_id uuid, p_via_key text", returns: "SETOF uuid", security: "definer" },
|
|
3023
3094
|
{ name: "relation_uncarry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "integer", security: "definer" },
|
|
3095
|
+
{ name: "relation_value_target_ok", args: "p_organization_id uuid, p_field_id uuid, p_field_data jsonb, p_target_id uuid", returns: "boolean", security: "invoker" },
|
|
3024
3096
|
{ name: "relation_words", args: "p_organization_id uuid, p_field_id uuid, p_value text", returns: "text", security: "definer" },
|
|
3025
3097
|
{ 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" },
|
|
3026
3098
|
{ name: "reopen_declared_doors", args: "", returns: "TABLE(reopened text)", security: "definer" },
|
|
@@ -3029,6 +3101,7 @@ var STORE_DOORS = [
|
|
|
3029
3101
|
{ name: "resolve_id", args: "p_organization_id uuid, p_id uuid", returns: "uuid", security: "invoker" },
|
|
3030
3102
|
{ name: "retired_actor_words", args: "", returns: "jsonb", security: "invoker" },
|
|
3031
3103
|
{ name: "rollup_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb", returns: "jsonb", security: "invoker" },
|
|
3104
|
+
{ name: "row_actions", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
3032
3105
|
{ name: "rule_applies", args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
3033
3106
|
{ name: "rule_context", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
3034
3107
|
{ name: "rule_declare", args: "p_organization_id uuid, p_spec jsonb, p_rule_id uuid DEFAULT NULL::uuid", returns: "uuid", security: "definer" },
|
|
@@ -3054,6 +3127,7 @@ var STORE_DOORS = [
|
|
|
3054
3127
|
{ name: "share_revoke", args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid", returns: "jsonb", security: "definer" },
|
|
3055
3128
|
{ name: "share_subject_name", args: "p_organization_id uuid, p_type text, p_id uuid", returns: "text", security: "definer" },
|
|
3056
3129
|
{ name: "shared_only_disagreements", args: "p_pretend text DEFAULT NULL::text", returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, record_id uuid, table_id uuid, ladder boolean, read_door boolean, rls_mirror boolean, why text)", security: "invoker" },
|
|
3130
|
+
{ name: "shares_outside", args: "p_organization_id uuid", returns: "TABLE(invitation_id uuid, table_id uuid, table_name text, email text, level text, level_label text, status text, joined boolean, expired boolean, invited_at timestamp with time zone, expires_at timestamp with time zone, say text)", security: "definer" },
|
|
3057
3131
|
{ name: "sign_request_cancel", args: "p_organization_id uuid, p_request_id uuid, p_reason text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
3058
3132
|
{ name: "sign_request_create", args: "p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_email text, p_signer_name text, p_expires_in interval DEFAULT '14 days'::interval", returns: "jsonb", security: "definer" },
|
|
3059
3133
|
{ name: "sign_request_decline", args: "p_token text, p_reason text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
@@ -3087,6 +3161,9 @@ var STORE_DOORS = [
|
|
|
3087
3161
|
{ name: "table_column_source", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
3088
3162
|
{ name: "table_contents", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, kind text, goes_at integer)", security: "invoker" },
|
|
3089
3163
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
3164
|
+
{ name: "table_decorate", args: "p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "definer" },
|
|
3165
|
+
{ name: "table_decorations", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
3166
|
+
{ name: "table_from_example", args: "p_organization_id uuid, p_home_id uuid, p_example jsonb", returns: "jsonb", security: "definer" },
|
|
3090
3167
|
{ name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
3091
3168
|
{ name: "table_is_live", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
3092
3169
|
{ name: "table_is_options_table", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
@@ -3104,9 +3181,13 @@ var STORE_DOORS = [
|
|
|
3104
3181
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
3105
3182
|
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
3106
3183
|
{ name: "table_unique_rule_fields", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "invoker" },
|
|
3184
|
+
{ name: "table_webhook_archive", args: "p_organization_id uuid, p_webhook_id uuid", returns: "boolean", security: "definer" },
|
|
3185
|
+
{ name: "table_webhook_declare", args: "p_organization_id uuid, p_table_id uuid, p_target_url text, p_events text[] DEFAULT NULL::text[], p_description text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
3186
|
+
{ name: "table_webhooks", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(webhook_id uuid, target_url text, description text, events text[], is_active boolean, last_attempt_at timestamp with time zone, last_success_at timestamp with time zone, consecutive_failures integer, owner_id uuid, created_at timestamp with time zone)", security: "definer" },
|
|
3107
3187
|
{ name: "table_work_kind", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
3108
3188
|
{ 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" },
|
|
3109
3189
|
{ name: "tables_described_without_asking", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
3190
|
+
{ name: "tables_shared_with_me", args: "", returns: "TABLE(table_id uuid, organization_id uuid, organization text, table_name text, level text, level_label text, shared_at timestamp with time zone, opens boolean, say text)", security: "definer" },
|
|
3110
3191
|
{ name: "trg_associations_bump_visibility", args: "", returns: "trigger", security: "definer" },
|
|
3111
3192
|
{ name: "undeclared_keys", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "text[]", security: "invoker" },
|
|
3112
3193
|
{ name: "validate_custom_fields", args: "p_token text, p_organization_id uuid, p_values jsonb", returns: "void", security: "invoker" },
|
|
@@ -3168,9 +3249,10 @@ var STORE_DOORS = [
|
|
|
3168
3249
|
];
|
|
3169
3250
|
var STORE_KNOBS = [
|
|
3170
3251
|
{ key: "accessible_entity_ids_guard", value: "true", type: "boolean" },
|
|
3252
|
+
{ key: "action_run_records_max", value: "5000", type: "integer" },
|
|
3171
3253
|
{ key: "agent_schema_changes", value: '"ask"', type: "string" },
|
|
3172
3254
|
{ key: "associations_guard", value: "true", type: "boolean" },
|
|
3173
|
-
{ key: "code_paths_enabled", value: "
|
|
3255
|
+
{ key: "code_paths_enabled", value: "true", type: "boolean" },
|
|
3174
3256
|
{ key: "consumer_chat_seeding_enabled", value: "false", type: "boolean" },
|
|
3175
3257
|
{ key: "consumer_checkout_enabled", value: "false", type: "boolean" },
|
|
3176
3258
|
{ key: "consumer_context_enabled", value: "false", type: "boolean" },
|
|
@@ -3182,6 +3264,8 @@ var STORE_KNOBS = [
|
|
|
3182
3264
|
{ key: "consumer_scopes_enabled", value: "false", type: "boolean" },
|
|
3183
3265
|
{ key: "containment_depth_ceiling", value: "16", type: "integer" },
|
|
3184
3266
|
{ key: "cross_organization_links", value: "false", type: "boolean" },
|
|
3267
|
+
{ key: "decoration_rules_max", value: "50", type: "integer" },
|
|
3268
|
+
{ key: "decorations_max_bytes", value: "262144", type: "integer" },
|
|
3185
3269
|
{ key: "document_letterhead", value: "{}", type: "json" },
|
|
3186
3270
|
{ key: "document_max_bytes", value: "1048576", type: "integer" },
|
|
3187
3271
|
{ key: "emergency_door_guard", value: "false", type: "boolean" },
|
|
@@ -3193,10 +3277,12 @@ var STORE_KNOBS = [
|
|
|
3193
3277
|
{ key: "enrichment_sensitivity_ceiling", value: '"internal"', type: "string" },
|
|
3194
3278
|
{ key: "entity_custom_fields_guard", value: "false", type: "boolean" },
|
|
3195
3279
|
{ key: "entity_types_guard", value: "false", type: "boolean" },
|
|
3280
|
+
{ key: "example_rows_max", value: "500", type: "integer" },
|
|
3196
3281
|
{ key: "export_rows_ceiling", value: "100000", type: "integer" },
|
|
3197
3282
|
{ key: "external_principal_enabled", value: "false", type: "boolean" },
|
|
3198
3283
|
{ key: "field_index_guard", value: "false", type: "boolean" },
|
|
3199
3284
|
{ key: "field_sensitivity_levels", value: '{"edit": {"public": "editor", "internal": "editor", "restricted": "admin", "confidential": "admin"}, "read": {"public": "viewer", "internal": "viewer", "restricted": "admin", "confidential": "editor"}}', type: "json" },
|
|
3285
|
+
{ key: "grid_layout", value: '{"mode": "auto", "wrap": false, "row_height": "normal", "fit_max_columns": 8, "freeze_first_column": false}', type: "json" },
|
|
3200
3286
|
{ key: "inbound_domain", value: '"inbound.matrxserver.com"', type: "string" },
|
|
3201
3287
|
{ key: "member_default_level", value: '"viewer"', type: "enum" },
|
|
3202
3288
|
{ key: "member_default_visibility", value: '"all_records"', type: "enum" },
|
|
@@ -3204,6 +3290,8 @@ var STORE_KNOBS = [
|
|
|
3204
3290
|
{ key: "page_size_ceiling", value: "1000", type: "integer" },
|
|
3205
3291
|
{ key: "provenance_retention_days", value: "30", type: "number" },
|
|
3206
3292
|
{ key: "records_tool_default", value: "true", type: "boolean" },
|
|
3293
|
+
{ key: "row_action_steps_max", value: "60", type: "integer" },
|
|
3294
|
+
{ key: "row_actions_max", value: "24", type: "integer" },
|
|
3207
3295
|
{ key: "row_versions_guard", value: "false", type: "boolean" },
|
|
3208
3296
|
{ key: "sandbox_expanded_frame_height_px", value: "20000", type: "integer" },
|
|
3209
3297
|
{ key: "sandbox_frame_height_px", value: "4000", type: "integer" },
|
|
@@ -3211,27 +3299,30 @@ var STORE_KNOBS = [
|
|
|
3211
3299
|
{ key: "sandbox_org_components", value: "true", type: "boolean" },
|
|
3212
3300
|
{ key: "signup_provisioning_guard", value: "false", type: "boolean" },
|
|
3213
3301
|
{ key: "stage_rule_enforcement", value: '"refuse"', type: "enum" },
|
|
3214
|
-
{ key: "system_enabled", value: "
|
|
3302
|
+
{ key: "system_enabled", value: "true", type: "boolean" },
|
|
3215
3303
|
{ key: "table_record_ceiling", value: "150000", type: "integer" },
|
|
3304
|
+
{ key: "table_webhooks_max", value: "10", type: "integer" },
|
|
3216
3305
|
{ key: "value_max_bytes", value: "100000", type: "integer" },
|
|
3217
3306
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
3218
3307
|
];
|
|
3219
3308
|
var STORE_REFUSAL_CODES = [
|
|
3220
|
-
{ 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" },
|
|
3309
|
+
{ 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_halves_repair,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_archive,table_share_outside_accept,table_share_outside_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" },
|
|
3221
3310
|
{ 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" },
|
|
3222
3311
|
{ code: "22003", raised_by: "context_resolve" },
|
|
3223
|
-
{ 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" },
|
|
3312
|
+
{ 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_halves_repair,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" },
|
|
3224
3313
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
3225
|
-
{ code: "22012", raised_by: "rule_eval" },
|
|
3226
|
-
{ 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" },
|
|
3227
|
-
{ 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" },
|
|
3314
|
+
{ code: "22012", raised_by: "formula_eval,rule_eval" },
|
|
3315
|
+
{ code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_take_op_id,_value_envelope,_work_shape_guard,action_run,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,formula_eval,formula_parse,grid_layout_check,hub_changed_by,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_from_example,table_rules,table_webhook_declare,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
3316
|
+
{ code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,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,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
3228
3317
|
{ 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" },
|
|
3229
|
-
{ 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" },
|
|
3318
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_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,_relation_kernel_targets,_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,action_run,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_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
3230
3319
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
3231
|
-
{ 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" },
|
|
3320
|
+
{ 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_purge_hard_request,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,relation_halves_disagreements,relation_halves_repair,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_webhook_declare,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
3232
3321
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
3233
3322
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
3323
|
+
{ code: "54000", raised_by: "action_run,hub_changed_by,table_decorate,table_from_example,table_webhook_declare" },
|
|
3234
3324
|
{ code: "54001", raised_by: "record_delete" },
|
|
3325
|
+
{ code: "P0001", raised_by: "action_run" },
|
|
3235
3326
|
{ code: "PT409", raised_by: "record_update" },
|
|
3236
3327
|
{ code: "PT428", raised_by: "_record_rule_uses" }
|
|
3237
3328
|
];
|
|
@@ -3262,6 +3353,7 @@ var ENTITY_TOKENS = [
|
|
|
3262
3353
|
"agent_shortcut",
|
|
3263
3354
|
"agent_surface_binding",
|
|
3264
3355
|
"agent_template",
|
|
3356
|
+
"agent_term_list",
|
|
3265
3357
|
"agent_usage",
|
|
3266
3358
|
"agent_user_kv",
|
|
3267
3359
|
"ai_api",
|
|
@@ -4851,6 +4943,13 @@ var BY_SQLSTATE = {
|
|
|
4851
4943
|
// stack. It is a LIMIT of the store, and the store's own sentence names what
|
|
4852
4944
|
// to do about it, so it reads as one.
|
|
4853
4945
|
"54001": "store_limit",
|
|
4946
|
+
// 54000 — the grid primitives' organization ceilings (GRID-PRIMITIVES, 2026-09-23):
|
|
4947
|
+
// `custom.action_run` on a selection past its knob, `custom.table_decorate` past the
|
|
4948
|
+
// rule count, `custom.table_from_example` past `custom/example_rows_max`,
|
|
4949
|
+
// `custom.table_webhook_declare` past `custom/table_webhooks_max`, and
|
|
4950
|
+
// `custom.hub_changed_by`. Each names its knob in the hint and writes nothing, so it
|
|
4951
|
+
// reads exactly like 54001: a limit of the store, in the store's own sentence.
|
|
4952
|
+
"54000": "store_limit",
|
|
4854
4953
|
// VIS: `custom.has_visibility_at` refuses to answer from a snapshot older
|
|
4855
4954
|
// than a write this reader has already seen, rather than returning something
|
|
4856
4955
|
// they just lost access to. It is retryable on a fresher connection, which is
|
|
@@ -4935,6 +5034,22 @@ function staleWriteDetail(error) {
|
|
|
4935
5034
|
};
|
|
4936
5035
|
}
|
|
4937
5036
|
|
|
5037
|
+
// src/core/recordChanges.ts
|
|
5038
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
5039
|
+
function announceRecordChanged(recordId) {
|
|
5040
|
+
for (const listener of [...listeners]) {
|
|
5041
|
+
try {
|
|
5042
|
+
listener(recordId);
|
|
5043
|
+
} catch (thrown) {
|
|
5044
|
+
console.error("[@ai-matrx/records] a record-change listener threw", thrown);
|
|
5045
|
+
}
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
function onRecordChanged(listener) {
|
|
5049
|
+
listeners.add(listener);
|
|
5050
|
+
return () => listeners.delete(listener);
|
|
5051
|
+
}
|
|
5052
|
+
|
|
4938
5053
|
// src/core/query.ts
|
|
4939
5054
|
var DEFAULT_PAGE_SIZE = 50;
|
|
4940
5055
|
function planQuery(query) {
|
|
@@ -4976,12 +5091,22 @@ function intersectIds(sets) {
|
|
|
4976
5091
|
|
|
4977
5092
|
// src/core/client.ts
|
|
4978
5093
|
var DEFAULT_SCHEMA = "custom";
|
|
5094
|
+
var A_PERSONS_REFUSAL = /* @__PURE__ */ new Set([
|
|
5095
|
+
"refused_by_rule",
|
|
5096
|
+
"stale_write",
|
|
5097
|
+
"invalid_argument",
|
|
5098
|
+
"already_exists",
|
|
5099
|
+
"missing_reference"
|
|
5100
|
+
]);
|
|
5101
|
+
function isAPersonsRefusal(code) {
|
|
5102
|
+
return A_PERSONS_REFUSAL.has(code);
|
|
5103
|
+
}
|
|
4979
5104
|
function sink(config) {
|
|
4980
|
-
return config.onError ?? ((e) =>
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
console.error(
|
|
4984
|
-
)
|
|
5105
|
+
return config.onError ?? ((e) => {
|
|
5106
|
+
const line = `[@ai-matrx/records] ${e.where}: ${e.code} \u2014 ${e.message}${e.hint ? ` (${e.hint})` : ""}`;
|
|
5107
|
+
if (isAPersonsRefusal(e.code)) console.info(line);
|
|
5108
|
+
else console.error(line);
|
|
5109
|
+
});
|
|
4985
5110
|
}
|
|
4986
5111
|
function createRecordsClient(config) {
|
|
4987
5112
|
const schema = config.schema ?? DEFAULT_SCHEMA;
|
|
@@ -5088,21 +5213,26 @@ function createRecordsClient(config) {
|
|
|
5088
5213
|
},
|
|
5089
5214
|
"recordUpdate"
|
|
5090
5215
|
);
|
|
5216
|
+
if (result.ok) announceRecordChanged(record_id);
|
|
5091
5217
|
return result;
|
|
5092
5218
|
},
|
|
5093
5219
|
async recordDelete({ record_id }) {
|
|
5094
|
-
|
|
5220
|
+
const result = await callDoor(
|
|
5095
5221
|
DOORS.recordDelete,
|
|
5096
5222
|
{ p_organization_id: org, p_record_id: record_id },
|
|
5097
5223
|
"recordDelete"
|
|
5098
5224
|
);
|
|
5225
|
+
if (result.ok) announceRecordChanged(record_id);
|
|
5226
|
+
return result;
|
|
5099
5227
|
},
|
|
5100
5228
|
async recordRestore({ record_id }) {
|
|
5101
|
-
|
|
5229
|
+
const result = await callDoor(
|
|
5102
5230
|
DOORS.recordRestore,
|
|
5103
5231
|
{ p_organization_id: org, p_record_id: record_id },
|
|
5104
5232
|
"recordRestore"
|
|
5105
5233
|
);
|
|
5234
|
+
if (result.ok) announceRecordChanged(record_id);
|
|
5235
|
+
return result;
|
|
5106
5236
|
},
|
|
5107
5237
|
async tableArchive({ table_id, chunk, includeTable }) {
|
|
5108
5238
|
return callDoor(
|
|
@@ -5152,6 +5282,24 @@ function createRecordsClient(config) {
|
|
|
5152
5282
|
})
|
|
5153
5283
|
);
|
|
5154
5284
|
},
|
|
5285
|
+
async tableArchived({ table_id }) {
|
|
5286
|
+
const kernel = await callDoor(DOORS.tableKernelId, {}, "tableArchived.kernel");
|
|
5287
|
+
if (!kernel.ok) return err(kernel.error);
|
|
5288
|
+
const PAGE = 200;
|
|
5289
|
+
for (let page = 0; page < 25; page += 1) {
|
|
5290
|
+
const answered = await this.listArchived({
|
|
5291
|
+
table_id: kernel.data,
|
|
5292
|
+
lane: "org",
|
|
5293
|
+
limit: PAGE,
|
|
5294
|
+
offset: page * PAGE
|
|
5295
|
+
});
|
|
5296
|
+
if (!answered.ok) return err(answered.error);
|
|
5297
|
+
const hit = answered.data.rows.find((row) => row.id === table_id);
|
|
5298
|
+
if (hit) return ok(hit);
|
|
5299
|
+
if (answered.data.total !== null) return ok(null);
|
|
5300
|
+
}
|
|
5301
|
+
return ok(null);
|
|
5302
|
+
},
|
|
5155
5303
|
async listArchived({ table_id, lane = DEFAULT_ARCHIVE_LANE, limit = 50, offset = 0 }) {
|
|
5156
5304
|
const door = await callDoor(
|
|
5157
5305
|
DOORS.readRecordsArchived,
|
|
@@ -5353,9 +5501,11 @@ function createRecordsClient(config) {
|
|
|
5353
5501
|
);
|
|
5354
5502
|
},
|
|
5355
5503
|
async fieldDeclare({ table_id, spec }) {
|
|
5504
|
+
const { allow_other, ...rest } = spec;
|
|
5505
|
+
const p_spec = allow_other === void 0 ? rest : { ...rest, config: { ...rest.config ?? {}, allow_other } };
|
|
5356
5506
|
return callDoor(
|
|
5357
5507
|
DOORS.fieldDeclare,
|
|
5358
|
-
{ p_organization_id: org, p_table_id: table_id, p_spec
|
|
5508
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec },
|
|
5359
5509
|
"fieldDeclare"
|
|
5360
5510
|
);
|
|
5361
5511
|
},
|
|
@@ -6323,14 +6473,16 @@ function createRecordsClient(config) {
|
|
|
6323
6473
|
);
|
|
6324
6474
|
},
|
|
6325
6475
|
async restoreVersion({ record_id, version }) {
|
|
6326
|
-
|
|
6476
|
+
const result = await callDoor(
|
|
6327
6477
|
DOORS.restoreVersion,
|
|
6328
6478
|
{ p_organization_id: org, p_record_id: record_id, p_version: version },
|
|
6329
6479
|
"restoreVersion"
|
|
6330
6480
|
);
|
|
6481
|
+
if (result.ok) announceRecordChanged(record_id);
|
|
6482
|
+
return result;
|
|
6331
6483
|
},
|
|
6332
6484
|
async valueRestore({ record_id, field_key, version }) {
|
|
6333
|
-
|
|
6485
|
+
const answered = await callDoor(
|
|
6334
6486
|
DOORS.valueRestore,
|
|
6335
6487
|
{
|
|
6336
6488
|
p_organization_id: org,
|
|
@@ -6340,6 +6492,8 @@ function createRecordsClient(config) {
|
|
|
6340
6492
|
},
|
|
6341
6493
|
"valueRestore"
|
|
6342
6494
|
);
|
|
6495
|
+
if (answered.ok) announceRecordChanged(record_id);
|
|
6496
|
+
return answered;
|
|
6343
6497
|
},
|
|
6344
6498
|
async commentThread({ record_id, include_resolved }) {
|
|
6345
6499
|
return callDoor(
|
|
@@ -7266,13 +7420,24 @@ function useRecords(tableId, options = {}) {
|
|
|
7266
7420
|
const liveReason = realtime ? tableId ? "Live: changes to this table re-read through the read door." : "Not live: no table selected." : "Not live: this host bound no realtime port, so this list updates when you reload it.";
|
|
7267
7421
|
return { ...base, live, liveReason };
|
|
7268
7422
|
}
|
|
7423
|
+
function useRecordChangeRevision(recordId) {
|
|
7424
|
+
const [revision, setRevision] = (0, import_react2.useState)(0);
|
|
7425
|
+
(0, import_react2.useEffect)(() => {
|
|
7426
|
+
if (!recordId) return;
|
|
7427
|
+
return onRecordChanged((changed) => {
|
|
7428
|
+
if (changed === recordId) setRevision((n) => n + 1);
|
|
7429
|
+
});
|
|
7430
|
+
}, [recordId]);
|
|
7431
|
+
return revision;
|
|
7432
|
+
}
|
|
7269
7433
|
function useRecord(recordId, withComputed = false) {
|
|
7434
|
+
const changed = useRecordChangeRevision(recordId);
|
|
7270
7435
|
return useAsync(
|
|
7271
7436
|
async (client) => {
|
|
7272
7437
|
if (!recordId) return { ok: true, data: null };
|
|
7273
7438
|
return client.recordRead({ record_id: recordId, withComputed });
|
|
7274
7439
|
},
|
|
7275
|
-
[recordId, withComputed]
|
|
7440
|
+
[recordId, withComputed, changed]
|
|
7276
7441
|
);
|
|
7277
7442
|
}
|
|
7278
7443
|
function useRecordMutation() {
|
|
@@ -7618,6 +7783,11 @@ var OVERRIDE_POLICIES = [
|
|
|
7618
7783
|
var FRESHNESS = ["live", "cached", "snapshot"];
|
|
7619
7784
|
var TABLE_DISPLAYS = ["list", "grid", "board", "calendar", "timeline"];
|
|
7620
7785
|
|
|
7786
|
+
// src/field.ts
|
|
7787
|
+
function allowsOtherValues(field) {
|
|
7788
|
+
return field.type === "list" && field.config?.["allow_other"] === true;
|
|
7789
|
+
}
|
|
7790
|
+
|
|
7621
7791
|
// src/choice.ts
|
|
7622
7792
|
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
7623
7793
|
function optionKey(option) {
|