@ai-matrx/records 0.17.0 → 0.20.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 +115 -0
- package/dist/core/index.cjs +404 -10
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +225 -3
- package/dist/core/index.d.ts +225 -3
- package/dist/core/index.js +404 -10
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +99 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +861 -11
- package/dist/index.d.ts +861 -11
- package/dist/index.js +99 -11
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +404 -10
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1059 -11
- package/dist/react/index.d.ts +1059 -11
- package/dist/react/index.js +404 -10
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const RETIRED_ACTOR_WORDS: {
|
|
|
6
6
|
readonly human: "user";
|
|
7
7
|
};
|
|
8
8
|
declare const ABSENCE_REASONS: readonly ["never asked", "none", "refused", "conflicting"];
|
|
9
|
-
declare const VALUE_ENVELOPE_KEYS: readonly ["ver", "src", "actor", "on_behalf_of", "at", "absent", "alternates", "dated"];
|
|
9
|
+
declare const VALUE_ENVELOPE_KEYS: readonly ["ver", "src", "actor", "on_behalf_of", "at", "absent", "alternates", "dated", "pinned"];
|
|
10
10
|
declare const VALUE_ALTERNATE_KEYS: readonly ["value", "src", "rank"];
|
|
11
11
|
declare const STORAGE_MODES: readonly ["light", "heavy"];
|
|
12
12
|
declare const RULE_USES: readonly ["validate", "compute", "membership", "applicability"];
|
|
@@ -369,6 +369,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
369
369
|
readonly args: "";
|
|
370
370
|
readonly returns: "name";
|
|
371
371
|
readonly security: "invoker";
|
|
372
|
+
}, {
|
|
373
|
+
readonly name: "carry_unchanged_value_stamps";
|
|
374
|
+
readonly args: "p_old jsonb, p_new jsonb";
|
|
375
|
+
readonly returns: "jsonb";
|
|
376
|
+
readonly security: "invoker";
|
|
372
377
|
}, {
|
|
373
378
|
readonly name: "carrying_edges_in";
|
|
374
379
|
readonly args: "p_organization_id uuid";
|
|
@@ -379,6 +384,56 @@ declare const STORE_DOORS: readonly [{
|
|
|
379
384
|
readonly args: "p_item_type text, p_item_id uuid";
|
|
380
385
|
readonly returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)";
|
|
381
386
|
readonly security: "definer";
|
|
387
|
+
}, {
|
|
388
|
+
readonly name: "checklist_declare";
|
|
389
|
+
readonly args: "p_organization_id uuid, p_spec jsonb, p_template_id uuid DEFAULT NULL::uuid";
|
|
390
|
+
readonly returns: "jsonb";
|
|
391
|
+
readonly security: "definer";
|
|
392
|
+
}, {
|
|
393
|
+
readonly name: "checklist_refusal";
|
|
394
|
+
readonly args: "p_spec jsonb";
|
|
395
|
+
readonly returns: "text";
|
|
396
|
+
readonly security: "invoker";
|
|
397
|
+
}, {
|
|
398
|
+
readonly name: "checklist_run";
|
|
399
|
+
readonly args: "p_organization_id uuid, p_run_id uuid";
|
|
400
|
+
readonly returns: "TABLE(step_id uuid, step_order integer, ref text, title text, role text, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, finished boolean, requires text, requires_key text, requires_label text, requires_id uuid, evidence jsonb, blocked_by text[], may_complete boolean, refusal text)";
|
|
401
|
+
readonly security: "definer";
|
|
402
|
+
}, {
|
|
403
|
+
readonly name: "checklist_runs";
|
|
404
|
+
readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_include_closed boolean DEFAULT true, p_limit integer DEFAULT 100";
|
|
405
|
+
readonly returns: "TABLE(run_id uuid, name text, template_id uuid, template text, about_record_id uuid, about text, about_table_id uuid, started_at timestamp with time zone, started_by uuid, origin text, step_count integer, done integer, overdue integer, next_step text, next_due timestamp with time zone, closed_at timestamp with time zone)";
|
|
406
|
+
readonly security: "definer";
|
|
407
|
+
}, {
|
|
408
|
+
readonly name: "checklist_start";
|
|
409
|
+
readonly args: "p_organization_id uuid, p_template_id uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_roles jsonb DEFAULT '{}'::jsonb, p_starting_at timestamp with time zone DEFAULT NULL::timestamp with time zone";
|
|
410
|
+
readonly returns: "jsonb";
|
|
411
|
+
readonly security: "definer";
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "checklist_step_complete";
|
|
414
|
+
readonly args: "p_organization_id uuid, p_step_id uuid, p_evidence jsonb DEFAULT '{}'::jsonb";
|
|
415
|
+
readonly returns: "jsonb";
|
|
416
|
+
readonly security: "definer";
|
|
417
|
+
}, {
|
|
418
|
+
readonly name: "checklist_step_refusal";
|
|
419
|
+
readonly args: "p_organization_id uuid, p_step_id uuid";
|
|
420
|
+
readonly returns: "text";
|
|
421
|
+
readonly security: "definer";
|
|
422
|
+
}, {
|
|
423
|
+
readonly name: "checklist_steps_table";
|
|
424
|
+
readonly args: "p_organization_id uuid";
|
|
425
|
+
readonly returns: "uuid";
|
|
426
|
+
readonly security: "definer";
|
|
427
|
+
}, {
|
|
428
|
+
readonly name: "checklist_template_shape";
|
|
429
|
+
readonly args: "p_organization_id uuid, p_template_id uuid";
|
|
430
|
+
readonly returns: "jsonb";
|
|
431
|
+
readonly security: "definer";
|
|
432
|
+
}, {
|
|
433
|
+
readonly name: "checklist_templates";
|
|
434
|
+
readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100";
|
|
435
|
+
readonly returns: "TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, roles integer, trigger_kind text, trigger_status text, open_runs integer, total_runs integer, updated_at timestamp with time zone)";
|
|
436
|
+
readonly security: "definer";
|
|
382
437
|
}, {
|
|
383
438
|
readonly name: "choice_census";
|
|
384
439
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
@@ -494,6 +549,31 @@ declare const STORE_DOORS: readonly [{
|
|
|
494
549
|
readonly args: "p_data jsonb";
|
|
495
550
|
readonly returns: "uuid";
|
|
496
551
|
readonly security: "invoker";
|
|
552
|
+
}, {
|
|
553
|
+
readonly name: "context_resolve";
|
|
554
|
+
readonly args: "p_organization_id uuid, p_bindings jsonb, p_scope_slug text DEFAULT 'scopes'::text";
|
|
555
|
+
readonly returns: "jsonb";
|
|
556
|
+
readonly security: "definer";
|
|
557
|
+
}, {
|
|
558
|
+
readonly name: "conversation_scope";
|
|
559
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid";
|
|
560
|
+
readonly returns: "jsonb";
|
|
561
|
+
readonly security: "definer";
|
|
562
|
+
}, {
|
|
563
|
+
readonly name: "conversation_scope_bind";
|
|
564
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid, p_record_id uuid";
|
|
565
|
+
readonly returns: "jsonb";
|
|
566
|
+
readonly security: "definer";
|
|
567
|
+
}, {
|
|
568
|
+
readonly name: "conversation_scope_context";
|
|
569
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8";
|
|
570
|
+
readonly returns: "jsonb";
|
|
571
|
+
readonly security: "definer";
|
|
572
|
+
}, {
|
|
573
|
+
readonly name: "conversation_scope_unbind";
|
|
574
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid";
|
|
575
|
+
readonly returns: "jsonb";
|
|
576
|
+
readonly security: "definer";
|
|
497
577
|
}, {
|
|
498
578
|
readonly name: "cross_organization_links_open";
|
|
499
579
|
readonly args: "p_source_organization_id uuid, p_target_organization_id uuid";
|
|
@@ -609,6 +689,21 @@ declare const STORE_DOORS: readonly [{
|
|
|
609
689
|
readonly args: "p_field_data jsonb, p_value jsonb";
|
|
610
690
|
readonly returns: "text";
|
|
611
691
|
readonly security: "invoker";
|
|
692
|
+
}, {
|
|
693
|
+
readonly name: "doc_letterhead";
|
|
694
|
+
readonly args: "p_organization_id uuid";
|
|
695
|
+
readonly returns: "jsonb";
|
|
696
|
+
readonly security: "definer";
|
|
697
|
+
}, {
|
|
698
|
+
readonly name: "doc_name_token_pattern";
|
|
699
|
+
readonly args: "";
|
|
700
|
+
readonly returns: "text";
|
|
701
|
+
readonly security: "invoker";
|
|
702
|
+
}, {
|
|
703
|
+
readonly name: "doc_name_tokens";
|
|
704
|
+
readonly args: "p_body text";
|
|
705
|
+
readonly returns: "TABLE(ordinal integer, raw text)";
|
|
706
|
+
readonly security: "invoker";
|
|
612
707
|
}, {
|
|
613
708
|
readonly name: "doc_render_body";
|
|
614
709
|
readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid";
|
|
@@ -709,6 +804,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
709
804
|
readonly args: "";
|
|
710
805
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
711
806
|
readonly security: "invoker";
|
|
807
|
+
}, {
|
|
808
|
+
readonly name: "doors_not_masking_fields";
|
|
809
|
+
readonly args: "";
|
|
810
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
811
|
+
readonly security: "invoker";
|
|
712
812
|
}, {
|
|
713
813
|
readonly name: "doors_not_on_one_ladder";
|
|
714
814
|
readonly args: "";
|
|
@@ -719,6 +819,61 @@ declare const STORE_DOORS: readonly [{
|
|
|
719
819
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
720
820
|
readonly returns: "permission_level";
|
|
721
821
|
readonly security: "definer";
|
|
822
|
+
}, {
|
|
823
|
+
readonly name: "enrich_cells";
|
|
824
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_field_keys text[] DEFAULT NULL::text[], p_record_ids uuid[] DEFAULT NULL::uuid[]";
|
|
825
|
+
readonly returns: "TABLE(record_id uuid, field_key text, agent_owned boolean, value jsonb, value_version integer, actor text, on_behalf_of text, written_at timestamp with time zone, source jsonb, absent_reason text, alternates jsonb, pinned boolean, stale boolean, due_at timestamp with time zone)";
|
|
826
|
+
readonly security: "definer";
|
|
827
|
+
}, {
|
|
828
|
+
readonly name: "enrich_declare";
|
|
829
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb";
|
|
830
|
+
readonly returns: "jsonb";
|
|
831
|
+
readonly security: "definer";
|
|
832
|
+
}, {
|
|
833
|
+
readonly name: "enrich_due";
|
|
834
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_limit integer DEFAULT 50, p_include_fresh boolean DEFAULT false";
|
|
835
|
+
readonly returns: "TABLE(record_id uuid, title text, inputs jsonb, current_value jsonb, written_at timestamp with time zone, reason text, trimmed_to integer)";
|
|
836
|
+
readonly security: "definer";
|
|
837
|
+
}, {
|
|
838
|
+
readonly name: "enrich_land";
|
|
839
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_results jsonb, p_run jsonb DEFAULT '{}'::jsonb";
|
|
840
|
+
readonly returns: "jsonb";
|
|
841
|
+
readonly security: "definer";
|
|
842
|
+
}, {
|
|
843
|
+
readonly name: "enrich_normalize";
|
|
844
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_spec jsonb";
|
|
845
|
+
readonly returns: "jsonb";
|
|
846
|
+
readonly security: "definer";
|
|
847
|
+
}, {
|
|
848
|
+
readonly name: "enrich_pin";
|
|
849
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_pinned boolean DEFAULT true";
|
|
850
|
+
readonly returns: "jsonb";
|
|
851
|
+
readonly security: "definer";
|
|
852
|
+
}, {
|
|
853
|
+
readonly name: "enrich_run_class";
|
|
854
|
+
readonly args: "";
|
|
855
|
+
readonly returns: "text";
|
|
856
|
+
readonly security: "invoker";
|
|
857
|
+
}, {
|
|
858
|
+
readonly name: "enrich_runs";
|
|
859
|
+
readonly args: "p_organization_id uuid, p_field_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50";
|
|
860
|
+
readonly returns: "TABLE(run_id uuid, field_id uuid, field_key text, model text, trigger_word text, rows_seen integer, rows_written integer, rows_absent integer, rows_below_floor integer, rows_pinned integer, rows_refused integer, cost_cents numeric, cost_per_row_cents numeric, ran_at timestamp with time zone)";
|
|
861
|
+
readonly security: "definer";
|
|
862
|
+
}, {
|
|
863
|
+
readonly name: "enrich_sensitivity_rank";
|
|
864
|
+
readonly args: "p_word text";
|
|
865
|
+
readonly returns: "integer";
|
|
866
|
+
readonly security: "invoker";
|
|
867
|
+
}, {
|
|
868
|
+
readonly name: "enrich_triggers";
|
|
869
|
+
readonly args: "";
|
|
870
|
+
readonly returns: "text[]";
|
|
871
|
+
readonly security: "invoker";
|
|
872
|
+
}, {
|
|
873
|
+
readonly name: "enrichments";
|
|
874
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
875
|
+
readonly returns: "TABLE(field_id uuid, table_id uuid, field_key text, label text, enrichment jsonb, enabled boolean, review_interval_days integer, rows_total integer, rows_filled integer, rows_stale integer, rows_pinned integer, rows_absent integer, runs integer, cost_cents numeric, cost_per_row_cents numeric, last_run_at timestamp with time zone, last_run jsonb)";
|
|
876
|
+
readonly security: "definer";
|
|
722
877
|
}, {
|
|
723
878
|
readonly name: "entity_field_declare";
|
|
724
879
|
readonly args: "p_organization_id uuid, p_token text, p_spec jsonb";
|
|
@@ -944,6 +1099,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
944
1099
|
readonly args: "p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text";
|
|
945
1100
|
readonly returns: "jsonb";
|
|
946
1101
|
readonly security: "invoker";
|
|
1102
|
+
}, {
|
|
1103
|
+
readonly name: "history_restore_body";
|
|
1104
|
+
readonly args: "p_current jsonb, p_target jsonb, p_field_key text, p_author jsonb";
|
|
1105
|
+
readonly returns: "jsonb";
|
|
1106
|
+
readonly security: "invoker";
|
|
947
1107
|
}, {
|
|
948
1108
|
readonly name: "history_retention";
|
|
949
1109
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
@@ -969,6 +1129,36 @@ declare const STORE_DOORS: readonly [{
|
|
|
969
1129
|
readonly args: "";
|
|
970
1130
|
readonly returns: "TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)";
|
|
971
1131
|
readonly security: "invoker";
|
|
1132
|
+
}, {
|
|
1133
|
+
readonly name: "inbound_addresses";
|
|
1134
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
1135
|
+
readonly returns: "jsonb";
|
|
1136
|
+
readonly security: "definer";
|
|
1137
|
+
}, {
|
|
1138
|
+
readonly name: "inbound_declare";
|
|
1139
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text";
|
|
1140
|
+
readonly returns: "jsonb";
|
|
1141
|
+
readonly security: "definer";
|
|
1142
|
+
}, {
|
|
1143
|
+
readonly name: "inbound_domain";
|
|
1144
|
+
readonly args: "p_organization_id uuid";
|
|
1145
|
+
readonly returns: "text";
|
|
1146
|
+
readonly security: "invoker";
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly name: "inbound_mail_land";
|
|
1149
|
+
readonly args: "p_address text, p_mail jsonb, p_secret text DEFAULT NULL::text";
|
|
1150
|
+
readonly returns: "jsonb";
|
|
1151
|
+
readonly security: "definer";
|
|
1152
|
+
}, {
|
|
1153
|
+
readonly name: "inbound_mail_map";
|
|
1154
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_mail jsonb";
|
|
1155
|
+
readonly returns: "jsonb";
|
|
1156
|
+
readonly security: "invoker";
|
|
1157
|
+
}, {
|
|
1158
|
+
readonly name: "inbound_set";
|
|
1159
|
+
readonly args: "p_organization_id uuid, p_inbound_id uuid, p_enabled boolean";
|
|
1160
|
+
readonly returns: "jsonb";
|
|
1161
|
+
readonly security: "definer";
|
|
972
1162
|
}, {
|
|
973
1163
|
readonly name: "index_payload";
|
|
974
1164
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
|
|
@@ -979,6 +1169,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
979
1169
|
readonly args: "p_data jsonb";
|
|
980
1170
|
readonly returns: "jsonb";
|
|
981
1171
|
readonly security: "invoker";
|
|
1172
|
+
}, {
|
|
1173
|
+
readonly name: "io_cell";
|
|
1174
|
+
readonly args: "p_organization_id uuid, p_field jsonb, p_word text, p_date_order text DEFAULT 'mdy'::text";
|
|
1175
|
+
readonly returns: "jsonb";
|
|
1176
|
+
readonly security: "invoker";
|
|
982
1177
|
}, {
|
|
983
1178
|
readonly name: "io_changed_field_ids";
|
|
984
1179
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb";
|
|
@@ -1024,21 +1219,61 @@ declare const STORE_DOORS: readonly [{
|
|
|
1024
1219
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text";
|
|
1025
1220
|
readonly returns: "text";
|
|
1026
1221
|
readonly security: "definer";
|
|
1222
|
+
}, {
|
|
1223
|
+
readonly name: "io_import_begin";
|
|
1224
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb, p_file_hash text DEFAULT NULL::text, p_policy jsonb DEFAULT '{}'::jsonb, p_dedupe_key text DEFAULT NULL::text, p_file_bytes bigint DEFAULT NULL::bigint, p_force boolean DEFAULT false";
|
|
1225
|
+
readonly returns: "jsonb";
|
|
1226
|
+
readonly security: "definer";
|
|
1227
|
+
}, {
|
|
1228
|
+
readonly name: "io_import_finish";
|
|
1229
|
+
readonly args: "p_organization_id uuid, p_import_id uuid, p_unmapped text DEFAULT NULL::text";
|
|
1230
|
+
readonly returns: "jsonb";
|
|
1231
|
+
readonly security: "definer";
|
|
1232
|
+
}, {
|
|
1233
|
+
readonly name: "io_import_forget";
|
|
1234
|
+
readonly args: "p_organization_id uuid, p_import_id uuid";
|
|
1235
|
+
readonly returns: "boolean";
|
|
1236
|
+
readonly security: "definer";
|
|
1027
1237
|
}, {
|
|
1028
1238
|
readonly name: "io_import_open";
|
|
1029
1239
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb";
|
|
1030
1240
|
readonly returns: "uuid";
|
|
1031
1241
|
readonly security: "definer";
|
|
1242
|
+
}, {
|
|
1243
|
+
readonly name: "io_import_plan";
|
|
1244
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_columns jsonb DEFAULT '[]'::jsonb";
|
|
1245
|
+
readonly returns: "jsonb";
|
|
1246
|
+
readonly security: "definer";
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly name: "io_import_report";
|
|
1249
|
+
readonly args: "p_organization_id uuid, p_import_id uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0";
|
|
1250
|
+
readonly returns: "jsonb";
|
|
1251
|
+
readonly security: "definer";
|
|
1032
1252
|
}, {
|
|
1033
1253
|
readonly name: "io_import_rows";
|
|
1034
1254
|
readonly args: "p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb";
|
|
1035
1255
|
readonly returns: "jsonb";
|
|
1036
1256
|
readonly security: "definer";
|
|
1257
|
+
}, {
|
|
1258
|
+
readonly name: "io_imports";
|
|
1259
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 25";
|
|
1260
|
+
readonly returns: "jsonb";
|
|
1261
|
+
readonly security: "definer";
|
|
1262
|
+
}, {
|
|
1263
|
+
readonly name: "io_infer_column";
|
|
1264
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_header text, p_samples jsonb DEFAULT '[]'::jsonb";
|
|
1265
|
+
readonly returns: "jsonb";
|
|
1266
|
+
readonly security: "definer";
|
|
1037
1267
|
}, {
|
|
1038
1268
|
readonly name: "io_infer_type";
|
|
1039
1269
|
readonly args: "p_samples jsonb";
|
|
1040
1270
|
readonly returns: "text";
|
|
1041
1271
|
readonly security: "invoker";
|
|
1272
|
+
}, {
|
|
1273
|
+
readonly name: "io_money_unit";
|
|
1274
|
+
readonly args: "p_word text";
|
|
1275
|
+
readonly returns: "text";
|
|
1276
|
+
readonly security: "invoker";
|
|
1042
1277
|
}, {
|
|
1043
1278
|
readonly name: "io_outbox_announce";
|
|
1044
1279
|
readonly args: "";
|
|
@@ -1064,26 +1299,56 @@ declare const STORE_DOORS: readonly [{
|
|
|
1064
1299
|
readonly args: "p_organization_id uuid, p_import_id uuid, p_column text";
|
|
1065
1300
|
readonly returns: "boolean";
|
|
1066
1301
|
readonly security: "definer";
|
|
1302
|
+
}, {
|
|
1303
|
+
readonly name: "io_proposal_spec";
|
|
1304
|
+
readonly args: "p_proposal jsonb";
|
|
1305
|
+
readonly returns: "jsonb";
|
|
1306
|
+
readonly security: "invoker";
|
|
1067
1307
|
}, {
|
|
1068
1308
|
readonly name: "io_record_changed";
|
|
1069
1309
|
readonly args: "";
|
|
1070
1310
|
readonly returns: "trigger";
|
|
1071
1311
|
readonly security: "definer";
|
|
1312
|
+
}, {
|
|
1313
|
+
readonly name: "io_relation_candidate";
|
|
1314
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_words text[]";
|
|
1315
|
+
readonly returns: "uuid";
|
|
1316
|
+
readonly security: "invoker";
|
|
1072
1317
|
}, {
|
|
1073
1318
|
readonly name: "io_restore";
|
|
1074
1319
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer";
|
|
1075
1320
|
readonly returns: "integer";
|
|
1076
1321
|
readonly security: "definer";
|
|
1322
|
+
}, {
|
|
1323
|
+
readonly name: "io_restore";
|
|
1324
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb";
|
|
1325
|
+
readonly returns: "integer";
|
|
1326
|
+
readonly security: "definer";
|
|
1077
1327
|
}, {
|
|
1078
1328
|
readonly name: "io_revisions";
|
|
1079
1329
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
1080
1330
|
readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)";
|
|
1081
1331
|
readonly security: "definer";
|
|
1332
|
+
}, {
|
|
1333
|
+
readonly name: "io_sample_words";
|
|
1334
|
+
readonly args: "p_samples jsonb";
|
|
1335
|
+
readonly returns: "TABLE(word text)";
|
|
1336
|
+
readonly security: "invoker";
|
|
1337
|
+
}, {
|
|
1338
|
+
readonly name: "io_value_shape";
|
|
1339
|
+
readonly args: "p_envelope jsonb";
|
|
1340
|
+
readonly returns: "jsonb";
|
|
1341
|
+
readonly security: "invoker";
|
|
1082
1342
|
}, {
|
|
1083
1343
|
readonly name: "is_a_retirement";
|
|
1084
1344
|
readonly args: "p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text";
|
|
1085
1345
|
readonly returns: "boolean";
|
|
1086
1346
|
readonly security: "invoker";
|
|
1347
|
+
}, {
|
|
1348
|
+
readonly name: "ladder_replanners";
|
|
1349
|
+
readonly args: "p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]";
|
|
1350
|
+
readonly returns: "TABLE(fn text, lang text, why text, remedy text)";
|
|
1351
|
+
readonly security: "definer";
|
|
1087
1352
|
}, {
|
|
1088
1353
|
readonly name: "list_door_disagreements";
|
|
1089
1354
|
readonly args: "p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200";
|
|
@@ -1109,6 +1374,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1109
1374
|
readonly args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb, p_declared_keys text[] DEFAULT NULL::text[]";
|
|
1110
1375
|
readonly returns: "jsonb";
|
|
1111
1376
|
readonly security: "invoker";
|
|
1377
|
+
}, {
|
|
1378
|
+
readonly name: "mask_says_withheld";
|
|
1379
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
1380
|
+
readonly returns: "boolean";
|
|
1381
|
+
readonly security: "invoker";
|
|
1112
1382
|
}, {
|
|
1113
1383
|
readonly name: "merge_field_kernel_id";
|
|
1114
1384
|
readonly args: "";
|
|
@@ -1184,6 +1454,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1184
1454
|
readonly args: "p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100";
|
|
1185
1455
|
readonly returns: "TABLE(id uuid, verb text, target_kind text, target_id uuid, note text, applied_at timestamp with time zone, applied_by uuid, undone_at timestamp with time zone)";
|
|
1186
1456
|
readonly security: "definer";
|
|
1457
|
+
}, {
|
|
1458
|
+
readonly name: "mirror_asks_the_whole_database";
|
|
1459
|
+
readonly args: "";
|
|
1460
|
+
readonly returns: "TABLE(schema_name text, table_name text, policy_name text, why text)";
|
|
1461
|
+
readonly security: "invoker";
|
|
1187
1462
|
}, {
|
|
1188
1463
|
readonly name: "my_level";
|
|
1189
1464
|
readonly args: "p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1249,6 +1524,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1249
1524
|
readonly args: "";
|
|
1250
1525
|
readonly returns: "uuid";
|
|
1251
1526
|
readonly security: "invoker";
|
|
1527
|
+
}, {
|
|
1528
|
+
readonly name: "pin_agent_cells";
|
|
1529
|
+
readonly args: "p_new jsonb, p_old jsonb, p_agent_keys text[]";
|
|
1530
|
+
readonly returns: "jsonb";
|
|
1531
|
+
readonly security: "invoker";
|
|
1252
1532
|
}, {
|
|
1253
1533
|
readonly name: "portal_admits";
|
|
1254
1534
|
readonly args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid";
|
|
@@ -1499,6 +1779,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1499
1779
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer";
|
|
1500
1780
|
readonly returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)";
|
|
1501
1781
|
readonly security: "definer";
|
|
1782
|
+
}, {
|
|
1783
|
+
readonly name: "read_mask";
|
|
1784
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text";
|
|
1785
|
+
readonly returns: "jsonb";
|
|
1786
|
+
readonly security: "definer";
|
|
1502
1787
|
}, {
|
|
1503
1788
|
readonly name: "read_paths_outside_the_door";
|
|
1504
1789
|
readonly args: "";
|
|
@@ -1579,6 +1864,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
1579
1864
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer";
|
|
1580
1865
|
readonly returns: "jsonb";
|
|
1581
1866
|
readonly security: "definer";
|
|
1867
|
+
}, {
|
|
1868
|
+
readonly name: "record_restore_version";
|
|
1869
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb";
|
|
1870
|
+
readonly returns: "jsonb";
|
|
1871
|
+
readonly security: "definer";
|
|
1872
|
+
}, {
|
|
1873
|
+
readonly name: "record_scope_context";
|
|
1874
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8";
|
|
1875
|
+
readonly returns: "jsonb";
|
|
1876
|
+
readonly security: "definer";
|
|
1582
1877
|
}, {
|
|
1583
1878
|
readonly name: "record_state_as_of";
|
|
1584
1879
|
readonly args: "p_record_id uuid, p_at timestamp with time zone";
|
|
@@ -1809,6 +2104,66 @@ declare const STORE_DOORS: readonly [{
|
|
|
1809
2104
|
readonly args: "p_pretend text DEFAULT NULL::text";
|
|
1810
2105
|
readonly 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)";
|
|
1811
2106
|
readonly security: "invoker";
|
|
2107
|
+
}, {
|
|
2108
|
+
readonly name: "sign_request_cancel";
|
|
2109
|
+
readonly args: "p_organization_id uuid, p_request_id uuid, p_reason text DEFAULT NULL::text";
|
|
2110
|
+
readonly returns: "jsonb";
|
|
2111
|
+
readonly security: "definer";
|
|
2112
|
+
}, {
|
|
2113
|
+
readonly name: "sign_request_create";
|
|
2114
|
+
readonly 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";
|
|
2115
|
+
readonly returns: "jsonb";
|
|
2116
|
+
readonly security: "definer";
|
|
2117
|
+
}, {
|
|
2118
|
+
readonly name: "sign_request_decline";
|
|
2119
|
+
readonly args: "p_token text, p_reason text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text";
|
|
2120
|
+
readonly returns: "jsonb";
|
|
2121
|
+
readonly security: "definer";
|
|
2122
|
+
}, {
|
|
2123
|
+
readonly name: "sign_request_public";
|
|
2124
|
+
readonly args: "p_token text, p_origin text DEFAULT NULL::text";
|
|
2125
|
+
readonly returns: "jsonb";
|
|
2126
|
+
readonly security: "definer";
|
|
2127
|
+
}, {
|
|
2128
|
+
readonly name: "sign_request_remind";
|
|
2129
|
+
readonly args: "p_organization_id uuid, p_request_id uuid";
|
|
2130
|
+
readonly returns: "jsonb";
|
|
2131
|
+
readonly security: "definer";
|
|
2132
|
+
}, {
|
|
2133
|
+
readonly name: "sign_request_sentence";
|
|
2134
|
+
readonly args: "p_data jsonb";
|
|
2135
|
+
readonly returns: "text";
|
|
2136
|
+
readonly security: "invoker";
|
|
2137
|
+
}, {
|
|
2138
|
+
readonly name: "sign_request_sign";
|
|
2139
|
+
readonly args: "p_token text, p_signed_name text, p_mark text, p_image text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text, p_origin text DEFAULT NULL::text";
|
|
2140
|
+
readonly returns: "jsonb";
|
|
2141
|
+
readonly security: "definer";
|
|
2142
|
+
}, {
|
|
2143
|
+
readonly name: "sign_request_state";
|
|
2144
|
+
readonly args: "p_data jsonb";
|
|
2145
|
+
readonly returns: "text";
|
|
2146
|
+
readonly security: "invoker";
|
|
2147
|
+
}, {
|
|
2148
|
+
readonly name: "sign_request_unchanged";
|
|
2149
|
+
readonly args: "p_organization_id uuid, p_request_id uuid";
|
|
2150
|
+
readonly returns: "boolean";
|
|
2151
|
+
readonly security: "definer";
|
|
2152
|
+
}, {
|
|
2153
|
+
readonly name: "sign_requests";
|
|
2154
|
+
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
2155
|
+
readonly returns: "TABLE(request_id uuid, render_id uuid, record_id uuid, field_key text, document_title text, signer_name text, signer_email text, signer_has_account boolean, state text, sentence text, document_version integer, document_hash text, sent_at timestamp with time zone, expires_at timestamp with time zone, viewed_at timestamp with time zone, signed_at timestamp with time zone, declined_at timestamp with time zone, invalidated_at timestamp with time zone, signature_id uuid, signature_mark text, reminder_count integer)";
|
|
2156
|
+
readonly security: "definer";
|
|
2157
|
+
}, {
|
|
2158
|
+
readonly name: "sign_token_decode";
|
|
2159
|
+
readonly args: "p_token text";
|
|
2160
|
+
readonly returns: "bytea";
|
|
2161
|
+
readonly security: "invoker";
|
|
2162
|
+
}, {
|
|
2163
|
+
readonly name: "sign_token_encode";
|
|
2164
|
+
readonly args: "p_bytes bytea";
|
|
2165
|
+
readonly returns: "text";
|
|
2166
|
+
readonly security: "invoker";
|
|
1812
2167
|
}, {
|
|
1813
2168
|
readonly name: "size_refusal";
|
|
1814
2169
|
readonly args: "p_organization_id uuid, p_data jsonb";
|
|
@@ -1974,6 +2329,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1974
2329
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer";
|
|
1975
2330
|
readonly returns: "jsonb";
|
|
1976
2331
|
readonly security: "definer";
|
|
2332
|
+
}, {
|
|
2333
|
+
readonly name: "value_restore";
|
|
2334
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer, p_author jsonb";
|
|
2335
|
+
readonly returns: "jsonb";
|
|
2336
|
+
readonly security: "definer";
|
|
1977
2337
|
}, {
|
|
1978
2338
|
readonly name: "value_versions";
|
|
1979
2339
|
readonly args: "p_old jsonb, p_new jsonb";
|
|
@@ -2024,6 +2384,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2024
2384
|
readonly args: "";
|
|
2025
2385
|
readonly returns: "uuid";
|
|
2026
2386
|
readonly security: "invoker";
|
|
2387
|
+
}, {
|
|
2388
|
+
readonly name: "withheld_marker";
|
|
2389
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
2390
|
+
readonly returns: "jsonb";
|
|
2391
|
+
readonly security: "invoker";
|
|
2392
|
+
}, {
|
|
2393
|
+
readonly name: "withheld_sentence";
|
|
2394
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
2395
|
+
readonly returns: "text";
|
|
2396
|
+
readonly security: "invoker";
|
|
2027
2397
|
}, {
|
|
2028
2398
|
readonly name: "work_approval_approvers";
|
|
2029
2399
|
readonly args: "p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid";
|
|
@@ -2246,6 +2616,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2246
2616
|
readonly key: "cross_organization_links";
|
|
2247
2617
|
readonly value: "false";
|
|
2248
2618
|
readonly type: "boolean";
|
|
2619
|
+
}, {
|
|
2620
|
+
readonly key: "document_letterhead";
|
|
2621
|
+
readonly value: "{}";
|
|
2622
|
+
readonly type: "json";
|
|
2249
2623
|
}, {
|
|
2250
2624
|
readonly key: "document_max_bytes";
|
|
2251
2625
|
readonly value: "1048576";
|
|
@@ -2258,6 +2632,26 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2258
2632
|
readonly key: "emergency_door_sweep_enabled";
|
|
2259
2633
|
readonly value: "false";
|
|
2260
2634
|
readonly type: "boolean";
|
|
2635
|
+
}, {
|
|
2636
|
+
readonly key: "enrichment_batch_ceiling";
|
|
2637
|
+
readonly value: "200";
|
|
2638
|
+
readonly type: "integer";
|
|
2639
|
+
}, {
|
|
2640
|
+
readonly key: "enrichment_confidence_floor";
|
|
2641
|
+
readonly value: "0.6";
|
|
2642
|
+
readonly type: "number";
|
|
2643
|
+
}, {
|
|
2644
|
+
readonly key: "enrichment_cost_cap_cents";
|
|
2645
|
+
readonly value: "2000";
|
|
2646
|
+
readonly type: "integer";
|
|
2647
|
+
}, {
|
|
2648
|
+
readonly key: "enrichment_model";
|
|
2649
|
+
readonly value: "\"claude-fable-5-latest\"";
|
|
2650
|
+
readonly type: "string";
|
|
2651
|
+
}, {
|
|
2652
|
+
readonly key: "enrichment_sensitivity_ceiling";
|
|
2653
|
+
readonly value: "\"internal\"";
|
|
2654
|
+
readonly type: "string";
|
|
2261
2655
|
}, {
|
|
2262
2656
|
readonly key: "entity_custom_fields_guard";
|
|
2263
2657
|
readonly value: "false";
|
|
@@ -2278,6 +2672,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2278
2672
|
readonly key: "field_sensitivity_levels";
|
|
2279
2673
|
readonly value: "{\"edit\": {\"public\": \"editor\", \"internal\": \"editor\", \"restricted\": \"admin\", \"confidential\": \"admin\"}, \"read\": {\"public\": \"viewer\", \"internal\": \"viewer\", \"restricted\": \"admin\", \"confidential\": \"editor\"}}";
|
|
2280
2674
|
readonly type: "json";
|
|
2675
|
+
}, {
|
|
2676
|
+
readonly key: "inbound_domain";
|
|
2677
|
+
readonly value: "\"inbound.matrxserver.com\"";
|
|
2678
|
+
readonly type: "string";
|
|
2281
2679
|
}, {
|
|
2282
2680
|
readonly key: "member_default_level";
|
|
2283
2681
|
readonly value: "\"viewer\"";
|
|
@@ -2339,13 +2737,16 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2339
2737
|
*/
|
|
2340
2738
|
declare const STORE_REFUSAL_CODES: readonly [{
|
|
2341
2739
|
readonly code: "02000";
|
|
2342
|
-
readonly raised_by: "dashboard_delete,dashboard_run,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,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_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,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,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
2740
|
+
readonly raised_by: "_checklist_instantiate,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_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,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,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
2343
2741
|
}, {
|
|
2344
2742
|
readonly code: "0A000";
|
|
2345
|
-
readonly raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign";
|
|
2743
|
+
readonly raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign";
|
|
2744
|
+
}, {
|
|
2745
|
+
readonly code: "22003";
|
|
2746
|
+
readonly raised_by: "context_resolve";
|
|
2346
2747
|
}, {
|
|
2347
2748
|
readonly code: "22004";
|
|
2348
|
-
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,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,
|
|
2749
|
+
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,portal_declare,portal_invite,portal_principal_bind,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,table_declare,value_restore,work_approval_decide,work_approval_request,work_template_declare";
|
|
2349
2750
|
}, {
|
|
2350
2751
|
readonly code: "22007";
|
|
2351
2752
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -2354,28 +2755,28 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
2354
2755
|
readonly raised_by: "rule_eval";
|
|
2355
2756
|
}, {
|
|
2356
2757
|
readonly code: "22023";
|
|
2357
|
-
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,
|
|
2758
|
+
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,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_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,pin_agent_cells,portal_declare,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold";
|
|
2358
2759
|
}, {
|
|
2359
2760
|
readonly code: "23503";
|
|
2360
|
-
readonly raised_by: "_containment_guard,_field_document_for,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,form_declare,form_submit,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,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,subscription_mute,work_set_state,work_take_assignment,work_template_instantiate";
|
|
2761
|
+
readonly raised_by: "_checklist_instantiate,_containment_guard,_field_document_for,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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,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,work_set_state,work_take_assignment,work_template_instantiate";
|
|
2361
2762
|
}, {
|
|
2362
2763
|
readonly code: "23505";
|
|
2363
|
-
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_approval_decide,work_slot_hold";
|
|
2764
|
+
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,work_approval_decide,work_slot_hold";
|
|
2364
2765
|
}, {
|
|
2365
2766
|
readonly code: "23514";
|
|
2366
|
-
readonly raised_by: "_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_shape_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
2767
|
+
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_shape_guard,_value_envelope,_work_shape_guard,_workdoors_approval_guard,assert_entity_is_organization_scoped,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,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
2367
2768
|
}, {
|
|
2368
2769
|
readonly code: "40001";
|
|
2369
2770
|
readonly raised_by: "has_visibility_at";
|
|
2370
2771
|
}, {
|
|
2371
2772
|
readonly code: "42501";
|
|
2372
|
-
readonly 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,comment_write,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_submit,io_comment_resolve,io_comment_write,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,record_table,share_grant,subscription_mute,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
2773
|
+
readonly 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,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,record_table,share_grant,subscription_mute,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
2373
2774
|
}, {
|
|
2374
2775
|
readonly code: "42703";
|
|
2375
2776
|
readonly raised_by: "entity_table,portal_declare";
|
|
2376
2777
|
}, {
|
|
2377
2778
|
readonly code: "53400";
|
|
2378
|
-
readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
|
|
2779
|
+
readonly raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field";
|
|
2379
2780
|
}, {
|
|
2380
2781
|
readonly code: "54001";
|
|
2381
2782
|
readonly raised_by: "record_delete";
|
|
@@ -3260,6 +3661,189 @@ interface FormSummary {
|
|
|
3260
3661
|
*/
|
|
3261
3662
|
declare function publicFormPath(formId: string): string;
|
|
3262
3663
|
|
|
3664
|
+
/** What the store thinks one column of a file is. */
|
|
3665
|
+
interface ImportColumnPlan {
|
|
3666
|
+
/** The heading exactly as the file spells it. */
|
|
3667
|
+
header: string;
|
|
3668
|
+
/** Set when this table already has the column; then `type` is that Field's. */
|
|
3669
|
+
field_id: Uuid | null;
|
|
3670
|
+
/** The key this column would become, or the key it matched. */
|
|
3671
|
+
field_key: string;
|
|
3672
|
+
label: string;
|
|
3673
|
+
/**
|
|
3674
|
+
* A parity type, or one of the three plain words (`text`, `long_text`,
|
|
3675
|
+
* `number`). It is exactly what `custom.field_declare` takes, so a plan can be
|
|
3676
|
+
* handed on with nothing in between to reinterpret it.
|
|
3677
|
+
*/
|
|
3678
|
+
type: ParityFieldType | "text" | "long_text" | "number" | "relation";
|
|
3679
|
+
matched: boolean;
|
|
3680
|
+
/** One sentence, in words a person reads, saying why the store said that. */
|
|
3681
|
+
why: string;
|
|
3682
|
+
/** Present on a money column. */
|
|
3683
|
+
unit?: string;
|
|
3684
|
+
/** Present when the store read the column as a dropdown: its words. */
|
|
3685
|
+
options?: string[];
|
|
3686
|
+
/** Present when the column points at another Table. */
|
|
3687
|
+
relation_target?: Uuid;
|
|
3688
|
+
/** A slashed date whose day/month order cannot be read off the file. */
|
|
3689
|
+
ambiguous?: boolean;
|
|
3690
|
+
/** Another column of the same file would make the same key. */
|
|
3691
|
+
collides_with?: string;
|
|
3692
|
+
samples?: unknown[];
|
|
3693
|
+
}
|
|
3694
|
+
interface ImportPlan {
|
|
3695
|
+
table_id: Uuid;
|
|
3696
|
+
columns: ImportColumnPlan[];
|
|
3697
|
+
matched: number;
|
|
3698
|
+
unmatched: number;
|
|
3699
|
+
fields: Array<{
|
|
3700
|
+
field_id: Uuid;
|
|
3701
|
+
key: string;
|
|
3702
|
+
label: string;
|
|
3703
|
+
type: string | null;
|
|
3704
|
+
}>;
|
|
3705
|
+
}
|
|
3706
|
+
/** What a run does when it meets something. Both defaults cannot lose anything. */
|
|
3707
|
+
interface ImportPolicy {
|
|
3708
|
+
/** `skip` leaves the record that is already there; `update` brings it up to date. */
|
|
3709
|
+
on_duplicate?: "skip" | "update";
|
|
3710
|
+
/** `propose` sends a new column to the ONE approvals inbox. `create` is an admin's. */
|
|
3711
|
+
unmapped?: "propose" | "create" | "ignore";
|
|
3712
|
+
/** How a slashed date is read. Chosen once for the run, never guessed per row. */
|
|
3713
|
+
date_order?: "mdy" | "dmy";
|
|
3714
|
+
}
|
|
3715
|
+
interface ImportOpened {
|
|
3716
|
+
import_id: Uuid;
|
|
3717
|
+
state: "open" | "written" | "finished";
|
|
3718
|
+
/**
|
|
3719
|
+
* TRUE means these exact bytes already landed on this Table and NOTHING was
|
|
3720
|
+
* written again. The numbers are the FIRST run's.
|
|
3721
|
+
*/
|
|
3722
|
+
already: boolean;
|
|
3723
|
+
rows_seen: number;
|
|
3724
|
+
rows_written: number;
|
|
3725
|
+
rows_duplicate: number;
|
|
3726
|
+
source_name: string | null;
|
|
3727
|
+
opened_at?: Timestamp;
|
|
3728
|
+
message: string;
|
|
3729
|
+
}
|
|
3730
|
+
/** One row of the file, and what became of it. */
|
|
3731
|
+
type ImportOutcome = {
|
|
3732
|
+
row: number;
|
|
3733
|
+
outcome: "landed";
|
|
3734
|
+
record_id: Uuid;
|
|
3735
|
+
} | {
|
|
3736
|
+
row: number;
|
|
3737
|
+
outcome: "duplicate";
|
|
3738
|
+
record_id: Uuid;
|
|
3739
|
+
updated: boolean;
|
|
3740
|
+
reason: string;
|
|
3741
|
+
} | {
|
|
3742
|
+
row: number;
|
|
3743
|
+
outcome: "refused";
|
|
3744
|
+
reason: string;
|
|
3745
|
+
source: Record<string, unknown>;
|
|
3746
|
+
};
|
|
3747
|
+
interface ImportProposal {
|
|
3748
|
+
column: string;
|
|
3749
|
+
field_key: string;
|
|
3750
|
+
label: string;
|
|
3751
|
+
type: string;
|
|
3752
|
+
why: string;
|
|
3753
|
+
samples: unknown[];
|
|
3754
|
+
state: "proposed" | "waiting" | "accepted" | "rejected" | "ignored" | "refused";
|
|
3755
|
+
/** Set once the column is waiting in the approvals inbox. */
|
|
3756
|
+
approval_id?: Uuid;
|
|
3757
|
+
/** Set once an admin added it outright. */
|
|
3758
|
+
field_id?: Uuid;
|
|
3759
|
+
reason?: string;
|
|
3760
|
+
options?: string[];
|
|
3761
|
+
unit?: string;
|
|
3762
|
+
relation_target?: Uuid;
|
|
3763
|
+
}
|
|
3764
|
+
interface ImportBatchResult {
|
|
3765
|
+
import_id: Uuid;
|
|
3766
|
+
rows_seen: number;
|
|
3767
|
+
rows_written: number;
|
|
3768
|
+
rows_duplicate: number;
|
|
3769
|
+
rows_refused: number;
|
|
3770
|
+
outcomes: ImportOutcome[];
|
|
3771
|
+
proposals: ImportProposal[];
|
|
3772
|
+
}
|
|
3773
|
+
interface ImportFinished {
|
|
3774
|
+
import_id: Uuid;
|
|
3775
|
+
state: "finished";
|
|
3776
|
+
rows_seen: number;
|
|
3777
|
+
rows_written: number;
|
|
3778
|
+
rows_duplicate: number;
|
|
3779
|
+
rows_refused: number;
|
|
3780
|
+
columns_offered: number;
|
|
3781
|
+
columns_added: number;
|
|
3782
|
+
columns_ignored: number;
|
|
3783
|
+
proposals: ImportProposal[];
|
|
3784
|
+
message: string;
|
|
3785
|
+
}
|
|
3786
|
+
/**
|
|
3787
|
+
* The rows a person clicks through to. `capped` and `note` are the store saying
|
|
3788
|
+
* out loud which part of the total it can still show — a number with nothing
|
|
3789
|
+
* behind it is the thing this shape exists to prevent.
|
|
3790
|
+
*/
|
|
3791
|
+
interface ImportReport {
|
|
3792
|
+
import_id: Uuid;
|
|
3793
|
+
table_id: Uuid;
|
|
3794
|
+
state: "refused" | "duplicate";
|
|
3795
|
+
rows: Array<Record<string, unknown>>;
|
|
3796
|
+
kept: number;
|
|
3797
|
+
total: number;
|
|
3798
|
+
capped: boolean;
|
|
3799
|
+
note: string | null;
|
|
3800
|
+
}
|
|
3801
|
+
interface ImportRun {
|
|
3802
|
+
import_id: Uuid;
|
|
3803
|
+
table_id: Uuid;
|
|
3804
|
+
format: "csv" | "xlsx";
|
|
3805
|
+
source_name: string | null;
|
|
3806
|
+
file_hash: string | null;
|
|
3807
|
+
dedupe_key: string | null;
|
|
3808
|
+
policy: ImportPolicy;
|
|
3809
|
+
state: string;
|
|
3810
|
+
rows_seen: number;
|
|
3811
|
+
rows_written: number;
|
|
3812
|
+
rows_duplicate: number;
|
|
3813
|
+
rows_refused: number;
|
|
3814
|
+
columns_offered: number;
|
|
3815
|
+
opened_at: Timestamp;
|
|
3816
|
+
finished_at: Timestamp | null;
|
|
3817
|
+
created_by: Uuid | null;
|
|
3818
|
+
}
|
|
3819
|
+
/** DOOR-19. An address a Table owns, and what has arrived at it. */
|
|
3820
|
+
interface InboundAddress {
|
|
3821
|
+
inbound_id: Uuid;
|
|
3822
|
+
table_id: Uuid | null;
|
|
3823
|
+
channel: string;
|
|
3824
|
+
address: string;
|
|
3825
|
+
source: string | null;
|
|
3826
|
+
enabled: boolean;
|
|
3827
|
+
last_received_at: Timestamp | null;
|
|
3828
|
+
created_at: Timestamp;
|
|
3829
|
+
received: number;
|
|
3830
|
+
}
|
|
3831
|
+
interface InboundDeclared {
|
|
3832
|
+
inbound_id: Uuid;
|
|
3833
|
+
table_id: Uuid;
|
|
3834
|
+
address: string;
|
|
3835
|
+
channel: string;
|
|
3836
|
+
enabled: boolean;
|
|
3837
|
+
/**
|
|
3838
|
+
* THE ONE THING THAT COULD FAIL SILENTLY, SAID OUT LOUD. The address is real
|
|
3839
|
+
* and stored the moment this comes back; whether mail REACHES it is a fact
|
|
3840
|
+
* about DNS that no door can make true. Show this sentence wherever the
|
|
3841
|
+
* address is shown.
|
|
3842
|
+
*/
|
|
3843
|
+
mail_route: string;
|
|
3844
|
+
message: string;
|
|
3845
|
+
}
|
|
3846
|
+
|
|
3263
3847
|
/** One portal as `custom.portals` reports it to its organization. */
|
|
3264
3848
|
interface PortalSummary {
|
|
3265
3849
|
portal_id: Uuid;
|
|
@@ -3518,6 +4102,174 @@ interface DashboardRunResult {
|
|
|
3518
4102
|
blocks: DashboardBlockResult[];
|
|
3519
4103
|
}
|
|
3520
4104
|
|
|
4105
|
+
/** VAL-8's whole vocabulary. There is no fourth word. */
|
|
4106
|
+
type HistoryActorKind = "user" | "agent" | "system";
|
|
4107
|
+
/**
|
|
4108
|
+
* WHO WROTE A VERSION.
|
|
4109
|
+
*
|
|
4110
|
+
* `kind` is the store's own word for the author. `name` is a person as a person
|
|
4111
|
+
* reads them — never a uuid; SCR-N-5 forbids printing one at a customer.
|
|
4112
|
+
* `on_behalf_of` is present only for an agent, and for an agent it is ALWAYS
|
|
4113
|
+
* present: an agent carries the exact authority of the person operating it
|
|
4114
|
+
* (AGT-N-4), so a screen that showed the machine without the person would be
|
|
4115
|
+
* hiding who is answerable.
|
|
4116
|
+
*/
|
|
4117
|
+
interface HistoryActor {
|
|
4118
|
+
kind: HistoryActorKind;
|
|
4119
|
+
user_id: Uuid | null;
|
|
4120
|
+
name: string | null;
|
|
4121
|
+
on_behalf_of: {
|
|
4122
|
+
user_id: Uuid;
|
|
4123
|
+
name: string | null;
|
|
4124
|
+
} | null;
|
|
4125
|
+
}
|
|
4126
|
+
/**
|
|
4127
|
+
* ONE FIELD THAT MOVED, with what it said before and what it says after.
|
|
4128
|
+
*
|
|
4129
|
+
* `label` is the Field's own label, so a timeline reads "Price" and not
|
|
4130
|
+
* `day_rate`. `rule` is FLD-9's computed provenance AT THAT VERSION — which
|
|
4131
|
+
* Rule, and which VERSION of the Rule, produced a derived value. `source` is
|
|
4132
|
+
* VAL-1's provenance, resolved from the pointer the document interns it under,
|
|
4133
|
+
* so a screen never prints `s3` at anybody.
|
|
4134
|
+
*/
|
|
4135
|
+
interface HistoryChange {
|
|
4136
|
+
key: string;
|
|
4137
|
+
field_id: Uuid | null;
|
|
4138
|
+
label: string;
|
|
4139
|
+
before: unknown;
|
|
4140
|
+
after: unknown;
|
|
4141
|
+
rule: {
|
|
4142
|
+
rule_id: Uuid;
|
|
4143
|
+
rule_version: number;
|
|
4144
|
+
computed_at: Timestamp;
|
|
4145
|
+
} | null;
|
|
4146
|
+
source: Record<string, unknown> | null;
|
|
4147
|
+
/** VAL-2: why a value is absent — never asked, none, refused, conflicting. */
|
|
4148
|
+
absent_reason: string | null;
|
|
4149
|
+
/** VAL-3: the other candidates the store kept, in rank order. */
|
|
4150
|
+
alternates: unknown[] | null;
|
|
4151
|
+
}
|
|
4152
|
+
/** One version of one record, as `custom.record_history` answers it, newest first. */
|
|
4153
|
+
interface RecordHistoryEntry {
|
|
4154
|
+
version: number;
|
|
4155
|
+
occurred_at: Timestamp;
|
|
4156
|
+
/** The machine word: `edit`, `merge`, `undo of merge`, `insert`… */
|
|
4157
|
+
operation: string;
|
|
4158
|
+
/** The same thing in the word a person used: "edited", "merge", "created". */
|
|
4159
|
+
operation_label: string;
|
|
4160
|
+
actor: HistoryActor;
|
|
4161
|
+
changes: HistoryChange[];
|
|
4162
|
+
/** Set when a compound verb wrote this version (HIS-8). */
|
|
4163
|
+
migration_id: Uuid | null;
|
|
4164
|
+
/**
|
|
4165
|
+
* HIS-8: this version was written by a compound operation whose Migration log
|
|
4166
|
+
* row is still there, so the WHOLE operation can be undone through
|
|
4167
|
+
* `custom.migrate_undo`. An ordinary edit is never "undoable" in that sense —
|
|
4168
|
+
* it is RESTORABLE, which is a different verb and a different button.
|
|
4169
|
+
*/
|
|
4170
|
+
undoable: boolean;
|
|
4171
|
+
}
|
|
4172
|
+
/**
|
|
4173
|
+
* ONE CHANGE TO ONE COLUMN, ANYWHERE IN A TABLE — the half of the question no
|
|
4174
|
+
* revision panel answers. Airtable and Notion both make you open each record
|
|
4175
|
+
* and look. Only records this person may see contribute, decided as a predicate
|
|
4176
|
+
* in the same statement rather than a filter afterwards.
|
|
4177
|
+
*/
|
|
4178
|
+
interface FieldHistoryEntry {
|
|
4179
|
+
record_id: Uuid;
|
|
4180
|
+
/** The Table's own title field, so a row names a record and not a uuid. */
|
|
4181
|
+
record_title: string;
|
|
4182
|
+
version: number;
|
|
4183
|
+
occurred_at: Timestamp;
|
|
4184
|
+
operation_label: string;
|
|
4185
|
+
actor: HistoryActor;
|
|
4186
|
+
before: unknown;
|
|
4187
|
+
after: unknown;
|
|
4188
|
+
}
|
|
4189
|
+
/**
|
|
4190
|
+
* WHAT A RESTORE WOULD DO, BEFORE IT DOES IT.
|
|
4191
|
+
*
|
|
4192
|
+
* `before` on each change is what the record says NOW and `after` is what it
|
|
4193
|
+
* would say. A key the target version did not have comes back with `after` of
|
|
4194
|
+
* `null` — the screen says "cleared", because that is what the write does to
|
|
4195
|
+
* it. Computed by the same body that computes the write, so the sentence and
|
|
4196
|
+
* the act cannot drift.
|
|
4197
|
+
*/
|
|
4198
|
+
interface RestorePreview {
|
|
4199
|
+
record_id: Uuid;
|
|
4200
|
+
from_version: number;
|
|
4201
|
+
to_version: number;
|
|
4202
|
+
saved_at: Timestamp;
|
|
4203
|
+
/** Present when the preview is for one column rather than the whole record. */
|
|
4204
|
+
field_key: string | null;
|
|
4205
|
+
changes: HistoryChange[];
|
|
4206
|
+
count: number;
|
|
4207
|
+
}
|
|
4208
|
+
/** What a restore actually did. A NEW version, always. */
|
|
4209
|
+
interface RestoreResult {
|
|
4210
|
+
record_id: Uuid;
|
|
4211
|
+
restored_from_version: number;
|
|
4212
|
+
/** The version the restore WROTE. */
|
|
4213
|
+
version: number;
|
|
4214
|
+
changed: HistoryChange[];
|
|
4215
|
+
count: number;
|
|
4216
|
+
/** Always `false`, and said out loud because it is what people fear. */
|
|
4217
|
+
history_rewritten: boolean;
|
|
4218
|
+
/** Present on a single-value restore. */
|
|
4219
|
+
field_key?: string;
|
|
4220
|
+
}
|
|
4221
|
+
/** One comment, with the people on it named. */
|
|
4222
|
+
interface RecordComment {
|
|
4223
|
+
id: Uuid;
|
|
4224
|
+
body: string;
|
|
4225
|
+
anchor: Record<string, unknown>;
|
|
4226
|
+
/**
|
|
4227
|
+
* The column this comment is about, when it is about one. Notion anchors a
|
|
4228
|
+
* comment to a block; here the block is a Field, so "this price looks wrong"
|
|
4229
|
+
* sits on the price instead of at the bottom of the record.
|
|
4230
|
+
*/
|
|
4231
|
+
field_key: string | null;
|
|
4232
|
+
parent_comment_id: Uuid | null;
|
|
4233
|
+
created_by: Uuid;
|
|
4234
|
+
created_by_name: string;
|
|
4235
|
+
created_at: Timestamp;
|
|
4236
|
+
resolved_at: Timestamp | null;
|
|
4237
|
+
resolved_by: Uuid | null;
|
|
4238
|
+
resolved_by_name: string | null;
|
|
4239
|
+
mentions: Array<{
|
|
4240
|
+
user_id: Uuid;
|
|
4241
|
+
name: string;
|
|
4242
|
+
}>;
|
|
4243
|
+
/** Mine, so a screen offers Resolve on my own and Reply on everybody's. */
|
|
4244
|
+
mine: boolean;
|
|
4245
|
+
}
|
|
4246
|
+
/**
|
|
4247
|
+
* A RECORD'S WHOLE THREAD, AND WHAT THIS PERSON MAY DO IN IT.
|
|
4248
|
+
*
|
|
4249
|
+
* The two booleans come from the STORE, in the same call that answers the
|
|
4250
|
+
* thread, because a composer drawn for somebody the write door will refuse is
|
|
4251
|
+
* the defect lane UI-HONEST spent a night removing. `commenter` is the second
|
|
4252
|
+
* rung: a viewer reads the conversation and cannot join it, which is exactly
|
|
4253
|
+
* what the two rungs mean.
|
|
4254
|
+
*/
|
|
4255
|
+
interface CommentThreadRead {
|
|
4256
|
+
record_id: Uuid;
|
|
4257
|
+
comments: RecordComment[];
|
|
4258
|
+
may_comment: boolean;
|
|
4259
|
+
may_resolve: boolean;
|
|
4260
|
+
}
|
|
4261
|
+
/** What `custom.comment_write` answers. */
|
|
4262
|
+
interface CommentWritten {
|
|
4263
|
+
comment_id: Uuid;
|
|
4264
|
+
mentioned: Uuid[];
|
|
4265
|
+
/**
|
|
4266
|
+
* How many people were actually TOLD. "I mentioned three people" and "three
|
|
4267
|
+
* people were told" are different facts and a screen that conflates them is
|
|
4268
|
+
* lying quietly.
|
|
4269
|
+
*/
|
|
4270
|
+
notified: number;
|
|
4271
|
+
}
|
|
4272
|
+
|
|
3521
4273
|
/** One token found in a body, in the order it appears. */
|
|
3522
4274
|
interface DocToken {
|
|
3523
4275
|
ordinal: number;
|
|
@@ -4349,4 +5101,102 @@ interface RecordsConfig {
|
|
|
4349
5101
|
schema?: string;
|
|
4350
5102
|
}
|
|
4351
5103
|
|
|
4352
|
-
|
|
5104
|
+
/** One value the agent was given, with the triple that makes it citable. */
|
|
5105
|
+
interface RecordScopeField {
|
|
5106
|
+
key: string;
|
|
5107
|
+
label: string;
|
|
5108
|
+
type: string;
|
|
5109
|
+
value: unknown;
|
|
5110
|
+
/** DYN: a merge field resolves to a TRIPLE, not a string. */
|
|
5111
|
+
cite: {
|
|
5112
|
+
record_id: Uuid;
|
|
5113
|
+
field_id: Uuid;
|
|
5114
|
+
value_version: number;
|
|
5115
|
+
written_at: string | null;
|
|
5116
|
+
};
|
|
5117
|
+
}
|
|
5118
|
+
/** A Field the agent was NOT given, and which of the two reasons it is. */
|
|
5119
|
+
interface RecordScopeWithheld {
|
|
5120
|
+
key: string;
|
|
5121
|
+
label: string;
|
|
5122
|
+
because: "masked" | "policy";
|
|
5123
|
+
reason: string;
|
|
5124
|
+
needs?: string;
|
|
5125
|
+
/** The whole sentence, already written — a screen prints it rather than composing one. */
|
|
5126
|
+
says: string;
|
|
5127
|
+
}
|
|
5128
|
+
interface RecordScopeRelation {
|
|
5129
|
+
via: string;
|
|
5130
|
+
target_id: Uuid;
|
|
5131
|
+
foreign: boolean;
|
|
5132
|
+
masked: boolean;
|
|
5133
|
+
your_level: PermissionLevel | null;
|
|
5134
|
+
card: Record<string, unknown> | null;
|
|
5135
|
+
why: string | null;
|
|
5136
|
+
}
|
|
5137
|
+
interface RecordScopeHistoryEntry {
|
|
5138
|
+
version: number;
|
|
5139
|
+
at: string;
|
|
5140
|
+
what: string;
|
|
5141
|
+
who: string | null;
|
|
5142
|
+
changes: Array<Record<string, unknown>>;
|
|
5143
|
+
}
|
|
5144
|
+
interface RecordScopeComment {
|
|
5145
|
+
id: Uuid;
|
|
5146
|
+
body: string;
|
|
5147
|
+
created_at: string;
|
|
5148
|
+
created_by_name: string;
|
|
5149
|
+
field_key: string | null;
|
|
5150
|
+
}
|
|
5151
|
+
interface RecordScopeContext {
|
|
5152
|
+
record: {
|
|
5153
|
+
id: Uuid;
|
|
5154
|
+
title: string;
|
|
5155
|
+
table_id: Uuid;
|
|
5156
|
+
table_name: string | null;
|
|
5157
|
+
scope_type: string;
|
|
5158
|
+
plural: string;
|
|
5159
|
+
version: number;
|
|
5160
|
+
updated_at: string;
|
|
5161
|
+
your_level: PermissionLevel;
|
|
5162
|
+
};
|
|
5163
|
+
fields: RecordScopeField[];
|
|
5164
|
+
withheld: RecordScopeWithheld[];
|
|
5165
|
+
relations: RecordScopeRelation[];
|
|
5166
|
+
history: RecordScopeHistoryEntry[];
|
|
5167
|
+
comments: RecordScopeComment[];
|
|
5168
|
+
may_comment: boolean;
|
|
5169
|
+
siblings: {
|
|
5170
|
+
shown: Array<{
|
|
5171
|
+
id: Uuid;
|
|
5172
|
+
title: string;
|
|
5173
|
+
}>;
|
|
5174
|
+
more_than_shown: boolean;
|
|
5175
|
+
says: string;
|
|
5176
|
+
};
|
|
5177
|
+
/** Questions derived from THIS record's shape — never a fixed list. */
|
|
5178
|
+
suggested: string[];
|
|
5179
|
+
/** One sentence naming what is not in the conversation. Printed verbatim. */
|
|
5180
|
+
says: string;
|
|
5181
|
+
assembled_at: string;
|
|
5182
|
+
}
|
|
5183
|
+
/** What a conversation is about. `readable` false means the person lost access to it. */
|
|
5184
|
+
interface ConversationScope {
|
|
5185
|
+
bound: boolean;
|
|
5186
|
+
readable?: boolean;
|
|
5187
|
+
record_id?: Uuid;
|
|
5188
|
+
table_id?: Uuid;
|
|
5189
|
+
scope_type?: string;
|
|
5190
|
+
title?: string;
|
|
5191
|
+
bound_at?: string;
|
|
5192
|
+
bound_by?: Uuid;
|
|
5193
|
+
because?: string;
|
|
5194
|
+
}
|
|
5195
|
+
interface ConversationScopeContext {
|
|
5196
|
+
scope: ConversationScope;
|
|
5197
|
+
context: RecordScopeContext | null;
|
|
5198
|
+
}
|
|
5199
|
+
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
5200
|
+
declare function scopeChip(scope: ConversationScope): string;
|
|
5201
|
+
|
|
5202
|
+
export { ABSENCE_REASONS, ACTOR_VOCABULARY, type AbsenceReason, type Actor, type AggregateBucket, type AggregateFilter, type AggregateMeasure, type AggregateOperation, type AggregateRow, type AggregateWindow, type AnonTokenBinding, COMPUTE_ON, CONTEXT_POLICIES, type ChoiceOption, type CommentThreadRead, type CommentWritten, type ComputeOn, type ContextPolicy, type ConversationScope, type ConversationScopeContext, type CustomFieldTableType, DELIVERIES, type DashboardBlock, type DashboardBlockKind, type DashboardBlockResult, type DashboardRunResult, type DashboardSummary, type Delivery, type DocRenderRow, type DocSignatureCheck, type DocSignatureRow, type DocTemplateRow, type DocToken, type DocUnresolvedToken, ENTITY_TOKENS, type EntityFieldRights, type EntityFieldValue, type EntityRecordMatch, type EntityRecordRead, type EntityRecordsFound, type EntityTableFacts, type EntityToken, type ExternalPrincipalCard, FIELD_SENSITIVITIES, FIELD_SOURCES, FRESHNESS, type Field, type FieldBehavior, type FieldHistoryEntry, type FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type HistoryActor, type HistoryActorKind, type HistoryChange, type Home, type ImportBatchResult, type ImportColumnPlan, type ImportFinished, type ImportOpened, type ImportOutcome, type ImportPlan, type ImportPolicy, type ImportProposal, type ImportReport, type ImportRun, type InboundAddress, type InboundDeclared, KERNEL_TABLES, type KernelTableName, MERGE_FIELD_MODIFIERS, MERGE_FIELD_SEMANTIC_TYPES, MERGE_FIELD_SOURCES, type MergeField, type MergeFieldModifier, type MergeFieldProvenance, type MergeFieldResolution, type MergeFieldSemanticType, type MergeFieldSource, type MergeFieldTransform, type MissingBehavior, type MyLevel, type MySubscription, type NewEntityFieldDeclaration, type NewFieldDeclaration, ON_DELETE, OVERRIDE_POLICIES, type OnDelete, type OverridePolicy, PARITY_FIELD_TYPES, PERMISSION_LEVELS, PER_VALUE_ACCESS_WORDS, type ParityFieldType, type ParityFieldTypeDescriptor, type PerValueAccessWord, type PermissionLevel, type PgError, type PortalCard, type PortalInvitation, type PortalPreviewRow, type PortalPrincipal, type PortalRevocation, type PortalSummary, type PortalTableExposure, type PredictedRefusal, type ProvenancePointer, type PublishBinding, RELATION_BINDINGS, RELATION_CARDINALITIES, RELATION_FLAVORS, RETIRED_ACTOR_WORDS, RULE_NODE_KINDS, RULE_USES, type ReadRow, type ReadValue, type RecordComment, type RecordDocument, type RecordHistoryEntry, type RecordRead, type RecordRevision, type RecordScopeComment, type RecordScopeContext, type RecordScopeField, type RecordScopeHistoryEntry, type RecordScopeRelation, type RecordScopeWithheld, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, type RestorePreview, type RestoreResult, type RetiredActorWord, type Rule, type RuleAnswer, type RuleExpression, type RuleNodeKind, type RuleUse, STORAGE_MODES, STORE_DOORS, STORE_KNOBS, STORE_REFUSAL_CODES, type StaleWriteDetail, type StorageMode, type StoreDoorName, type StoreRefusalCode, type StoredRecord, type StuckRow, type Subscription, type SubscriptionBlock, type SubscriptionCadence, TABLE_DISPLAYS, TABLE_ORIGINS, TABLE_TYPES, type Table, type TableCapacity, type TableDisplay, type TableOrigin, type TableProposal, type TableType, type Timestamp, type Uuid, VALUE_ALTERNATE_KEYS, VALUE_ENVELOPE_KEYS, type ValueAlternate, type ValueAlternateKey, type ValueEnvelope, type ValueEnvelopeKey, type ValueSource, type WorkApprovalDecision, type WorkApprovalFiled, type WorkApprover, type WorkAssignment, type WorkAssignmentField, type WorkChange, type WorkDueState, type WorkGraph, type WorkInboxItem, type WorkInboxKind, type WorkInstantiation, type WorkListFlavour, type WorkListItem, type WorkOrigin, type WorkRecordState, type WorkSlotHold, type WorkState, type WorkTemplateNode, type WorkTemplateRelation, type WorkTurn, type WriteConflict, asPermissionLevel, atLeast, choiceSlug, choiceValuesOf, choicesOf, err, highestLevel, holdsARetiredChoice, isRecordsErr, isTheChosen, looksLikeAnId, measureKey, ok, optionKey, optionLabel, portalPath, publicFormPath, scopeChip };
|