@ai-matrx/records 0.17.0 → 0.21.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 +149 -0
- package/dist/core/index.cjs +494 -10
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +295 -3
- package/dist/core/index.d.ts +295 -3
- package/dist/core/index.js +494 -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 +1040 -11
- package/dist/index.d.ts +1040 -11
- package/dist/index.js +99 -11
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +494 -10
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1299 -11
- package/dist/react/index.d.ts +1299 -11
- package/dist/react/index.js +494 -10
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ declare const RETIRED_ACTOR_WORDS: {
|
|
|
9
9
|
readonly human: "user";
|
|
10
10
|
};
|
|
11
11
|
declare const ABSENCE_REASONS: readonly ["never asked", "none", "refused", "conflicting"];
|
|
12
|
-
declare const VALUE_ENVELOPE_KEYS: readonly ["ver", "src", "actor", "on_behalf_of", "at", "absent", "alternates", "dated"];
|
|
12
|
+
declare const VALUE_ENVELOPE_KEYS: readonly ["ver", "src", "actor", "on_behalf_of", "at", "absent", "alternates", "dated", "pinned"];
|
|
13
13
|
declare const VALUE_ALTERNATE_KEYS: readonly ["value", "src", "rank"];
|
|
14
14
|
declare const STORAGE_MODES: readonly ["light", "heavy"];
|
|
15
15
|
declare const RULE_USES: readonly ["validate", "compute", "membership", "applicability"];
|
|
@@ -372,6 +372,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
372
372
|
readonly args: "";
|
|
373
373
|
readonly returns: "name";
|
|
374
374
|
readonly security: "invoker";
|
|
375
|
+
}, {
|
|
376
|
+
readonly name: "carry_unchanged_value_stamps";
|
|
377
|
+
readonly args: "p_old jsonb, p_new jsonb";
|
|
378
|
+
readonly returns: "jsonb";
|
|
379
|
+
readonly security: "invoker";
|
|
375
380
|
}, {
|
|
376
381
|
readonly name: "carrying_edges_in";
|
|
377
382
|
readonly args: "p_organization_id uuid";
|
|
@@ -382,6 +387,56 @@ declare const STORE_DOORS: readonly [{
|
|
|
382
387
|
readonly args: "p_item_type text, p_item_id uuid";
|
|
383
388
|
readonly returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)";
|
|
384
389
|
readonly security: "definer";
|
|
390
|
+
}, {
|
|
391
|
+
readonly name: "checklist_declare";
|
|
392
|
+
readonly args: "p_organization_id uuid, p_spec jsonb, p_template_id uuid DEFAULT NULL::uuid";
|
|
393
|
+
readonly returns: "jsonb";
|
|
394
|
+
readonly security: "definer";
|
|
395
|
+
}, {
|
|
396
|
+
readonly name: "checklist_refusal";
|
|
397
|
+
readonly args: "p_spec jsonb";
|
|
398
|
+
readonly returns: "text";
|
|
399
|
+
readonly security: "invoker";
|
|
400
|
+
}, {
|
|
401
|
+
readonly name: "checklist_run";
|
|
402
|
+
readonly args: "p_organization_id uuid, p_run_id uuid";
|
|
403
|
+
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)";
|
|
404
|
+
readonly security: "definer";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "checklist_runs";
|
|
407
|
+
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";
|
|
408
|
+
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)";
|
|
409
|
+
readonly security: "definer";
|
|
410
|
+
}, {
|
|
411
|
+
readonly name: "checklist_start";
|
|
412
|
+
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";
|
|
413
|
+
readonly returns: "jsonb";
|
|
414
|
+
readonly security: "definer";
|
|
415
|
+
}, {
|
|
416
|
+
readonly name: "checklist_step_complete";
|
|
417
|
+
readonly args: "p_organization_id uuid, p_step_id uuid, p_evidence jsonb DEFAULT '{}'::jsonb";
|
|
418
|
+
readonly returns: "jsonb";
|
|
419
|
+
readonly security: "definer";
|
|
420
|
+
}, {
|
|
421
|
+
readonly name: "checklist_step_refusal";
|
|
422
|
+
readonly args: "p_organization_id uuid, p_step_id uuid";
|
|
423
|
+
readonly returns: "text";
|
|
424
|
+
readonly security: "definer";
|
|
425
|
+
}, {
|
|
426
|
+
readonly name: "checklist_steps_table";
|
|
427
|
+
readonly args: "p_organization_id uuid";
|
|
428
|
+
readonly returns: "uuid";
|
|
429
|
+
readonly security: "definer";
|
|
430
|
+
}, {
|
|
431
|
+
readonly name: "checklist_template_shape";
|
|
432
|
+
readonly args: "p_organization_id uuid, p_template_id uuid";
|
|
433
|
+
readonly returns: "jsonb";
|
|
434
|
+
readonly security: "definer";
|
|
435
|
+
}, {
|
|
436
|
+
readonly name: "checklist_templates";
|
|
437
|
+
readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100";
|
|
438
|
+
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)";
|
|
439
|
+
readonly security: "definer";
|
|
385
440
|
}, {
|
|
386
441
|
readonly name: "choice_census";
|
|
387
442
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
@@ -497,6 +552,31 @@ declare const STORE_DOORS: readonly [{
|
|
|
497
552
|
readonly args: "p_data jsonb";
|
|
498
553
|
readonly returns: "uuid";
|
|
499
554
|
readonly security: "invoker";
|
|
555
|
+
}, {
|
|
556
|
+
readonly name: "context_resolve";
|
|
557
|
+
readonly args: "p_organization_id uuid, p_bindings jsonb, p_scope_slug text DEFAULT 'scopes'::text";
|
|
558
|
+
readonly returns: "jsonb";
|
|
559
|
+
readonly security: "definer";
|
|
560
|
+
}, {
|
|
561
|
+
readonly name: "conversation_scope";
|
|
562
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid";
|
|
563
|
+
readonly returns: "jsonb";
|
|
564
|
+
readonly security: "definer";
|
|
565
|
+
}, {
|
|
566
|
+
readonly name: "conversation_scope_bind";
|
|
567
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid, p_record_id uuid";
|
|
568
|
+
readonly returns: "jsonb";
|
|
569
|
+
readonly security: "definer";
|
|
570
|
+
}, {
|
|
571
|
+
readonly name: "conversation_scope_context";
|
|
572
|
+
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";
|
|
573
|
+
readonly returns: "jsonb";
|
|
574
|
+
readonly security: "definer";
|
|
575
|
+
}, {
|
|
576
|
+
readonly name: "conversation_scope_unbind";
|
|
577
|
+
readonly args: "p_organization_id uuid, p_conversation_id uuid";
|
|
578
|
+
readonly returns: "jsonb";
|
|
579
|
+
readonly security: "definer";
|
|
500
580
|
}, {
|
|
501
581
|
readonly name: "cross_organization_links_open";
|
|
502
582
|
readonly args: "p_source_organization_id uuid, p_target_organization_id uuid";
|
|
@@ -612,6 +692,21 @@ declare const STORE_DOORS: readonly [{
|
|
|
612
692
|
readonly args: "p_field_data jsonb, p_value jsonb";
|
|
613
693
|
readonly returns: "text";
|
|
614
694
|
readonly security: "invoker";
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "doc_letterhead";
|
|
697
|
+
readonly args: "p_organization_id uuid";
|
|
698
|
+
readonly returns: "jsonb";
|
|
699
|
+
readonly security: "definer";
|
|
700
|
+
}, {
|
|
701
|
+
readonly name: "doc_name_token_pattern";
|
|
702
|
+
readonly args: "";
|
|
703
|
+
readonly returns: "text";
|
|
704
|
+
readonly security: "invoker";
|
|
705
|
+
}, {
|
|
706
|
+
readonly name: "doc_name_tokens";
|
|
707
|
+
readonly args: "p_body text";
|
|
708
|
+
readonly returns: "TABLE(ordinal integer, raw text)";
|
|
709
|
+
readonly security: "invoker";
|
|
615
710
|
}, {
|
|
616
711
|
readonly name: "doc_render_body";
|
|
617
712
|
readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid";
|
|
@@ -712,6 +807,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
712
807
|
readonly args: "";
|
|
713
808
|
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
714
809
|
readonly security: "invoker";
|
|
810
|
+
}, {
|
|
811
|
+
readonly name: "doors_not_masking_fields";
|
|
812
|
+
readonly args: "";
|
|
813
|
+
readonly returns: "TABLE(function_name text, identity_args text, why text)";
|
|
814
|
+
readonly security: "invoker";
|
|
715
815
|
}, {
|
|
716
816
|
readonly name: "doors_not_on_one_ladder";
|
|
717
817
|
readonly args: "";
|
|
@@ -722,6 +822,61 @@ declare const STORE_DOORS: readonly [{
|
|
|
722
822
|
readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
723
823
|
readonly returns: "permission_level";
|
|
724
824
|
readonly security: "definer";
|
|
825
|
+
}, {
|
|
826
|
+
readonly name: "enrich_cells";
|
|
827
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_field_keys text[] DEFAULT NULL::text[], p_record_ids uuid[] DEFAULT NULL::uuid[]";
|
|
828
|
+
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)";
|
|
829
|
+
readonly security: "definer";
|
|
830
|
+
}, {
|
|
831
|
+
readonly name: "enrich_declare";
|
|
832
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb";
|
|
833
|
+
readonly returns: "jsonb";
|
|
834
|
+
readonly security: "definer";
|
|
835
|
+
}, {
|
|
836
|
+
readonly name: "enrich_due";
|
|
837
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_limit integer DEFAULT 50, p_include_fresh boolean DEFAULT false";
|
|
838
|
+
readonly returns: "TABLE(record_id uuid, title text, inputs jsonb, current_value jsonb, written_at timestamp with time zone, reason text, trimmed_to integer)";
|
|
839
|
+
readonly security: "definer";
|
|
840
|
+
}, {
|
|
841
|
+
readonly name: "enrich_land";
|
|
842
|
+
readonly args: "p_organization_id uuid, p_field_id uuid, p_results jsonb, p_run jsonb DEFAULT '{}'::jsonb";
|
|
843
|
+
readonly returns: "jsonb";
|
|
844
|
+
readonly security: "definer";
|
|
845
|
+
}, {
|
|
846
|
+
readonly name: "enrich_normalize";
|
|
847
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_spec jsonb";
|
|
848
|
+
readonly returns: "jsonb";
|
|
849
|
+
readonly security: "definer";
|
|
850
|
+
}, {
|
|
851
|
+
readonly name: "enrich_pin";
|
|
852
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_pinned boolean DEFAULT true";
|
|
853
|
+
readonly returns: "jsonb";
|
|
854
|
+
readonly security: "definer";
|
|
855
|
+
}, {
|
|
856
|
+
readonly name: "enrich_run_class";
|
|
857
|
+
readonly args: "";
|
|
858
|
+
readonly returns: "text";
|
|
859
|
+
readonly security: "invoker";
|
|
860
|
+
}, {
|
|
861
|
+
readonly name: "enrich_runs";
|
|
862
|
+
readonly args: "p_organization_id uuid, p_field_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50";
|
|
863
|
+
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)";
|
|
864
|
+
readonly security: "definer";
|
|
865
|
+
}, {
|
|
866
|
+
readonly name: "enrich_sensitivity_rank";
|
|
867
|
+
readonly args: "p_word text";
|
|
868
|
+
readonly returns: "integer";
|
|
869
|
+
readonly security: "invoker";
|
|
870
|
+
}, {
|
|
871
|
+
readonly name: "enrich_triggers";
|
|
872
|
+
readonly args: "";
|
|
873
|
+
readonly returns: "text[]";
|
|
874
|
+
readonly security: "invoker";
|
|
875
|
+
}, {
|
|
876
|
+
readonly name: "enrichments";
|
|
877
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
878
|
+
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)";
|
|
879
|
+
readonly security: "definer";
|
|
725
880
|
}, {
|
|
726
881
|
readonly name: "entity_field_declare";
|
|
727
882
|
readonly args: "p_organization_id uuid, p_token text, p_spec jsonb";
|
|
@@ -947,6 +1102,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
947
1102
|
readonly args: "p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text";
|
|
948
1103
|
readonly returns: "jsonb";
|
|
949
1104
|
readonly security: "invoker";
|
|
1105
|
+
}, {
|
|
1106
|
+
readonly name: "history_restore_body";
|
|
1107
|
+
readonly args: "p_current jsonb, p_target jsonb, p_field_key text, p_author jsonb";
|
|
1108
|
+
readonly returns: "jsonb";
|
|
1109
|
+
readonly security: "invoker";
|
|
950
1110
|
}, {
|
|
951
1111
|
readonly name: "history_retention";
|
|
952
1112
|
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
@@ -972,6 +1132,36 @@ declare const STORE_DOORS: readonly [{
|
|
|
972
1132
|
readonly args: "";
|
|
973
1133
|
readonly returns: "TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)";
|
|
974
1134
|
readonly security: "invoker";
|
|
1135
|
+
}, {
|
|
1136
|
+
readonly name: "inbound_addresses";
|
|
1137
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid";
|
|
1138
|
+
readonly returns: "jsonb";
|
|
1139
|
+
readonly security: "definer";
|
|
1140
|
+
}, {
|
|
1141
|
+
readonly name: "inbound_declare";
|
|
1142
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text";
|
|
1143
|
+
readonly returns: "jsonb";
|
|
1144
|
+
readonly security: "definer";
|
|
1145
|
+
}, {
|
|
1146
|
+
readonly name: "inbound_domain";
|
|
1147
|
+
readonly args: "p_organization_id uuid";
|
|
1148
|
+
readonly returns: "text";
|
|
1149
|
+
readonly security: "invoker";
|
|
1150
|
+
}, {
|
|
1151
|
+
readonly name: "inbound_mail_land";
|
|
1152
|
+
readonly args: "p_address text, p_mail jsonb, p_secret text DEFAULT NULL::text";
|
|
1153
|
+
readonly returns: "jsonb";
|
|
1154
|
+
readonly security: "definer";
|
|
1155
|
+
}, {
|
|
1156
|
+
readonly name: "inbound_mail_map";
|
|
1157
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_mail jsonb";
|
|
1158
|
+
readonly returns: "jsonb";
|
|
1159
|
+
readonly security: "invoker";
|
|
1160
|
+
}, {
|
|
1161
|
+
readonly name: "inbound_set";
|
|
1162
|
+
readonly args: "p_organization_id uuid, p_inbound_id uuid, p_enabled boolean";
|
|
1163
|
+
readonly returns: "jsonb";
|
|
1164
|
+
readonly security: "definer";
|
|
975
1165
|
}, {
|
|
976
1166
|
readonly name: "index_payload";
|
|
977
1167
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000";
|
|
@@ -982,6 +1172,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
982
1172
|
readonly args: "p_data jsonb";
|
|
983
1173
|
readonly returns: "jsonb";
|
|
984
1174
|
readonly security: "invoker";
|
|
1175
|
+
}, {
|
|
1176
|
+
readonly name: "io_cell";
|
|
1177
|
+
readonly args: "p_organization_id uuid, p_field jsonb, p_word text, p_date_order text DEFAULT 'mdy'::text";
|
|
1178
|
+
readonly returns: "jsonb";
|
|
1179
|
+
readonly security: "invoker";
|
|
985
1180
|
}, {
|
|
986
1181
|
readonly name: "io_changed_field_ids";
|
|
987
1182
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb";
|
|
@@ -1027,21 +1222,61 @@ declare const STORE_DOORS: readonly [{
|
|
|
1027
1222
|
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";
|
|
1028
1223
|
readonly returns: "text";
|
|
1029
1224
|
readonly security: "definer";
|
|
1225
|
+
}, {
|
|
1226
|
+
readonly name: "io_import_begin";
|
|
1227
|
+
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";
|
|
1228
|
+
readonly returns: "jsonb";
|
|
1229
|
+
readonly security: "definer";
|
|
1230
|
+
}, {
|
|
1231
|
+
readonly name: "io_import_finish";
|
|
1232
|
+
readonly args: "p_organization_id uuid, p_import_id uuid, p_unmapped text DEFAULT NULL::text";
|
|
1233
|
+
readonly returns: "jsonb";
|
|
1234
|
+
readonly security: "definer";
|
|
1235
|
+
}, {
|
|
1236
|
+
readonly name: "io_import_forget";
|
|
1237
|
+
readonly args: "p_organization_id uuid, p_import_id uuid";
|
|
1238
|
+
readonly returns: "boolean";
|
|
1239
|
+
readonly security: "definer";
|
|
1030
1240
|
}, {
|
|
1031
1241
|
readonly name: "io_import_open";
|
|
1032
1242
|
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";
|
|
1033
1243
|
readonly returns: "uuid";
|
|
1034
1244
|
readonly security: "definer";
|
|
1245
|
+
}, {
|
|
1246
|
+
readonly name: "io_import_plan";
|
|
1247
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_columns jsonb DEFAULT '[]'::jsonb";
|
|
1248
|
+
readonly returns: "jsonb";
|
|
1249
|
+
readonly security: "definer";
|
|
1250
|
+
}, {
|
|
1251
|
+
readonly name: "io_import_report";
|
|
1252
|
+
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";
|
|
1253
|
+
readonly returns: "jsonb";
|
|
1254
|
+
readonly security: "definer";
|
|
1035
1255
|
}, {
|
|
1036
1256
|
readonly name: "io_import_rows";
|
|
1037
1257
|
readonly args: "p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb";
|
|
1038
1258
|
readonly returns: "jsonb";
|
|
1039
1259
|
readonly security: "definer";
|
|
1260
|
+
}, {
|
|
1261
|
+
readonly name: "io_imports";
|
|
1262
|
+
readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 25";
|
|
1263
|
+
readonly returns: "jsonb";
|
|
1264
|
+
readonly security: "definer";
|
|
1265
|
+
}, {
|
|
1266
|
+
readonly name: "io_infer_column";
|
|
1267
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_header text, p_samples jsonb DEFAULT '[]'::jsonb";
|
|
1268
|
+
readonly returns: "jsonb";
|
|
1269
|
+
readonly security: "definer";
|
|
1040
1270
|
}, {
|
|
1041
1271
|
readonly name: "io_infer_type";
|
|
1042
1272
|
readonly args: "p_samples jsonb";
|
|
1043
1273
|
readonly returns: "text";
|
|
1044
1274
|
readonly security: "invoker";
|
|
1275
|
+
}, {
|
|
1276
|
+
readonly name: "io_money_unit";
|
|
1277
|
+
readonly args: "p_word text";
|
|
1278
|
+
readonly returns: "text";
|
|
1279
|
+
readonly security: "invoker";
|
|
1045
1280
|
}, {
|
|
1046
1281
|
readonly name: "io_outbox_announce";
|
|
1047
1282
|
readonly args: "";
|
|
@@ -1067,26 +1302,56 @@ declare const STORE_DOORS: readonly [{
|
|
|
1067
1302
|
readonly args: "p_organization_id uuid, p_import_id uuid, p_column text";
|
|
1068
1303
|
readonly returns: "boolean";
|
|
1069
1304
|
readonly security: "definer";
|
|
1305
|
+
}, {
|
|
1306
|
+
readonly name: "io_proposal_spec";
|
|
1307
|
+
readonly args: "p_proposal jsonb";
|
|
1308
|
+
readonly returns: "jsonb";
|
|
1309
|
+
readonly security: "invoker";
|
|
1070
1310
|
}, {
|
|
1071
1311
|
readonly name: "io_record_changed";
|
|
1072
1312
|
readonly args: "";
|
|
1073
1313
|
readonly returns: "trigger";
|
|
1074
1314
|
readonly security: "definer";
|
|
1315
|
+
}, {
|
|
1316
|
+
readonly name: "io_relation_candidate";
|
|
1317
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_words text[]";
|
|
1318
|
+
readonly returns: "uuid";
|
|
1319
|
+
readonly security: "invoker";
|
|
1075
1320
|
}, {
|
|
1076
1321
|
readonly name: "io_restore";
|
|
1077
1322
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer";
|
|
1078
1323
|
readonly returns: "integer";
|
|
1079
1324
|
readonly security: "definer";
|
|
1325
|
+
}, {
|
|
1326
|
+
readonly name: "io_restore";
|
|
1327
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb";
|
|
1328
|
+
readonly returns: "integer";
|
|
1329
|
+
readonly security: "definer";
|
|
1080
1330
|
}, {
|
|
1081
1331
|
readonly name: "io_revisions";
|
|
1082
1332
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
1083
1333
|
readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)";
|
|
1084
1334
|
readonly security: "definer";
|
|
1335
|
+
}, {
|
|
1336
|
+
readonly name: "io_sample_words";
|
|
1337
|
+
readonly args: "p_samples jsonb";
|
|
1338
|
+
readonly returns: "TABLE(word text)";
|
|
1339
|
+
readonly security: "invoker";
|
|
1340
|
+
}, {
|
|
1341
|
+
readonly name: "io_value_shape";
|
|
1342
|
+
readonly args: "p_envelope jsonb";
|
|
1343
|
+
readonly returns: "jsonb";
|
|
1344
|
+
readonly security: "invoker";
|
|
1085
1345
|
}, {
|
|
1086
1346
|
readonly name: "is_a_retirement";
|
|
1087
1347
|
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";
|
|
1088
1348
|
readonly returns: "boolean";
|
|
1089
1349
|
readonly security: "invoker";
|
|
1350
|
+
}, {
|
|
1351
|
+
readonly name: "ladder_replanners";
|
|
1352
|
+
readonly args: "p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]";
|
|
1353
|
+
readonly returns: "TABLE(fn text, lang text, why text, remedy text)";
|
|
1354
|
+
readonly security: "definer";
|
|
1090
1355
|
}, {
|
|
1091
1356
|
readonly name: "list_door_disagreements";
|
|
1092
1357
|
readonly args: "p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200";
|
|
@@ -1112,6 +1377,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1112
1377
|
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[]";
|
|
1113
1378
|
readonly returns: "jsonb";
|
|
1114
1379
|
readonly security: "invoker";
|
|
1380
|
+
}, {
|
|
1381
|
+
readonly name: "mask_says_withheld";
|
|
1382
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
1383
|
+
readonly returns: "boolean";
|
|
1384
|
+
readonly security: "invoker";
|
|
1115
1385
|
}, {
|
|
1116
1386
|
readonly name: "merge_field_kernel_id";
|
|
1117
1387
|
readonly args: "";
|
|
@@ -1187,6 +1457,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1187
1457
|
readonly args: "p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100";
|
|
1188
1458
|
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)";
|
|
1189
1459
|
readonly security: "definer";
|
|
1460
|
+
}, {
|
|
1461
|
+
readonly name: "mirror_asks_the_whole_database";
|
|
1462
|
+
readonly args: "";
|
|
1463
|
+
readonly returns: "TABLE(schema_name text, table_name text, policy_name text, why text)";
|
|
1464
|
+
readonly security: "invoker";
|
|
1190
1465
|
}, {
|
|
1191
1466
|
readonly name: "my_level";
|
|
1192
1467
|
readonly args: "p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text";
|
|
@@ -1252,6 +1527,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1252
1527
|
readonly args: "";
|
|
1253
1528
|
readonly returns: "uuid";
|
|
1254
1529
|
readonly security: "invoker";
|
|
1530
|
+
}, {
|
|
1531
|
+
readonly name: "pin_agent_cells";
|
|
1532
|
+
readonly args: "p_new jsonb, p_old jsonb, p_agent_keys text[]";
|
|
1533
|
+
readonly returns: "jsonb";
|
|
1534
|
+
readonly security: "invoker";
|
|
1255
1535
|
}, {
|
|
1256
1536
|
readonly name: "portal_admits";
|
|
1257
1537
|
readonly args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid";
|
|
@@ -1502,6 +1782,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1502
1782
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer";
|
|
1503
1783
|
readonly returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)";
|
|
1504
1784
|
readonly security: "definer";
|
|
1785
|
+
}, {
|
|
1786
|
+
readonly name: "read_mask";
|
|
1787
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text";
|
|
1788
|
+
readonly returns: "jsonb";
|
|
1789
|
+
readonly security: "definer";
|
|
1505
1790
|
}, {
|
|
1506
1791
|
readonly name: "read_paths_outside_the_door";
|
|
1507
1792
|
readonly args: "";
|
|
@@ -1582,6 +1867,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
1582
1867
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer";
|
|
1583
1868
|
readonly returns: "jsonb";
|
|
1584
1869
|
readonly security: "definer";
|
|
1870
|
+
}, {
|
|
1871
|
+
readonly name: "record_restore_version";
|
|
1872
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb";
|
|
1873
|
+
readonly returns: "jsonb";
|
|
1874
|
+
readonly security: "definer";
|
|
1875
|
+
}, {
|
|
1876
|
+
readonly name: "record_scope_context";
|
|
1877
|
+
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";
|
|
1878
|
+
readonly returns: "jsonb";
|
|
1879
|
+
readonly security: "definer";
|
|
1585
1880
|
}, {
|
|
1586
1881
|
readonly name: "record_state_as_of";
|
|
1587
1882
|
readonly args: "p_record_id uuid, p_at timestamp with time zone";
|
|
@@ -1812,6 +2107,66 @@ declare const STORE_DOORS: readonly [{
|
|
|
1812
2107
|
readonly args: "p_pretend text DEFAULT NULL::text";
|
|
1813
2108
|
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)";
|
|
1814
2109
|
readonly security: "invoker";
|
|
2110
|
+
}, {
|
|
2111
|
+
readonly name: "sign_request_cancel";
|
|
2112
|
+
readonly args: "p_organization_id uuid, p_request_id uuid, p_reason text DEFAULT NULL::text";
|
|
2113
|
+
readonly returns: "jsonb";
|
|
2114
|
+
readonly security: "definer";
|
|
2115
|
+
}, {
|
|
2116
|
+
readonly name: "sign_request_create";
|
|
2117
|
+
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";
|
|
2118
|
+
readonly returns: "jsonb";
|
|
2119
|
+
readonly security: "definer";
|
|
2120
|
+
}, {
|
|
2121
|
+
readonly name: "sign_request_decline";
|
|
2122
|
+
readonly args: "p_token text, p_reason text DEFAULT NULL::text, p_ip text DEFAULT NULL::text, p_user_agent text DEFAULT NULL::text";
|
|
2123
|
+
readonly returns: "jsonb";
|
|
2124
|
+
readonly security: "definer";
|
|
2125
|
+
}, {
|
|
2126
|
+
readonly name: "sign_request_public";
|
|
2127
|
+
readonly args: "p_token text, p_origin text DEFAULT NULL::text";
|
|
2128
|
+
readonly returns: "jsonb";
|
|
2129
|
+
readonly security: "definer";
|
|
2130
|
+
}, {
|
|
2131
|
+
readonly name: "sign_request_remind";
|
|
2132
|
+
readonly args: "p_organization_id uuid, p_request_id uuid";
|
|
2133
|
+
readonly returns: "jsonb";
|
|
2134
|
+
readonly security: "definer";
|
|
2135
|
+
}, {
|
|
2136
|
+
readonly name: "sign_request_sentence";
|
|
2137
|
+
readonly args: "p_data jsonb";
|
|
2138
|
+
readonly returns: "text";
|
|
2139
|
+
readonly security: "invoker";
|
|
2140
|
+
}, {
|
|
2141
|
+
readonly name: "sign_request_sign";
|
|
2142
|
+
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";
|
|
2143
|
+
readonly returns: "jsonb";
|
|
2144
|
+
readonly security: "definer";
|
|
2145
|
+
}, {
|
|
2146
|
+
readonly name: "sign_request_state";
|
|
2147
|
+
readonly args: "p_data jsonb";
|
|
2148
|
+
readonly returns: "text";
|
|
2149
|
+
readonly security: "invoker";
|
|
2150
|
+
}, {
|
|
2151
|
+
readonly name: "sign_request_unchanged";
|
|
2152
|
+
readonly args: "p_organization_id uuid, p_request_id uuid";
|
|
2153
|
+
readonly returns: "boolean";
|
|
2154
|
+
readonly security: "definer";
|
|
2155
|
+
}, {
|
|
2156
|
+
readonly name: "sign_requests";
|
|
2157
|
+
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
2158
|
+
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)";
|
|
2159
|
+
readonly security: "definer";
|
|
2160
|
+
}, {
|
|
2161
|
+
readonly name: "sign_token_decode";
|
|
2162
|
+
readonly args: "p_token text";
|
|
2163
|
+
readonly returns: "bytea";
|
|
2164
|
+
readonly security: "invoker";
|
|
2165
|
+
}, {
|
|
2166
|
+
readonly name: "sign_token_encode";
|
|
2167
|
+
readonly args: "p_bytes bytea";
|
|
2168
|
+
readonly returns: "text";
|
|
2169
|
+
readonly security: "invoker";
|
|
1815
2170
|
}, {
|
|
1816
2171
|
readonly name: "size_refusal";
|
|
1817
2172
|
readonly args: "p_organization_id uuid, p_data jsonb";
|
|
@@ -1977,6 +2332,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1977
2332
|
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer";
|
|
1978
2333
|
readonly returns: "jsonb";
|
|
1979
2334
|
readonly security: "definer";
|
|
2335
|
+
}, {
|
|
2336
|
+
readonly name: "value_restore";
|
|
2337
|
+
readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer, p_author jsonb";
|
|
2338
|
+
readonly returns: "jsonb";
|
|
2339
|
+
readonly security: "definer";
|
|
1980
2340
|
}, {
|
|
1981
2341
|
readonly name: "value_versions";
|
|
1982
2342
|
readonly args: "p_old jsonb, p_new jsonb";
|
|
@@ -2027,6 +2387,16 @@ declare const STORE_DOORS: readonly [{
|
|
|
2027
2387
|
readonly args: "";
|
|
2028
2388
|
readonly returns: "uuid";
|
|
2029
2389
|
readonly security: "invoker";
|
|
2390
|
+
}, {
|
|
2391
|
+
readonly name: "withheld_marker";
|
|
2392
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
2393
|
+
readonly returns: "jsonb";
|
|
2394
|
+
readonly security: "invoker";
|
|
2395
|
+
}, {
|
|
2396
|
+
readonly name: "withheld_sentence";
|
|
2397
|
+
readonly args: "p_mask jsonb, p_key text";
|
|
2398
|
+
readonly returns: "text";
|
|
2399
|
+
readonly security: "invoker";
|
|
2030
2400
|
}, {
|
|
2031
2401
|
readonly name: "work_approval_approvers";
|
|
2032
2402
|
readonly args: "p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid";
|
|
@@ -2249,6 +2619,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2249
2619
|
readonly key: "cross_organization_links";
|
|
2250
2620
|
readonly value: "false";
|
|
2251
2621
|
readonly type: "boolean";
|
|
2622
|
+
}, {
|
|
2623
|
+
readonly key: "document_letterhead";
|
|
2624
|
+
readonly value: "{}";
|
|
2625
|
+
readonly type: "json";
|
|
2252
2626
|
}, {
|
|
2253
2627
|
readonly key: "document_max_bytes";
|
|
2254
2628
|
readonly value: "1048576";
|
|
@@ -2261,6 +2635,26 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2261
2635
|
readonly key: "emergency_door_sweep_enabled";
|
|
2262
2636
|
readonly value: "false";
|
|
2263
2637
|
readonly type: "boolean";
|
|
2638
|
+
}, {
|
|
2639
|
+
readonly key: "enrichment_batch_ceiling";
|
|
2640
|
+
readonly value: "200";
|
|
2641
|
+
readonly type: "integer";
|
|
2642
|
+
}, {
|
|
2643
|
+
readonly key: "enrichment_confidence_floor";
|
|
2644
|
+
readonly value: "0.6";
|
|
2645
|
+
readonly type: "number";
|
|
2646
|
+
}, {
|
|
2647
|
+
readonly key: "enrichment_cost_cap_cents";
|
|
2648
|
+
readonly value: "2000";
|
|
2649
|
+
readonly type: "integer";
|
|
2650
|
+
}, {
|
|
2651
|
+
readonly key: "enrichment_model";
|
|
2652
|
+
readonly value: "\"claude-fable-5-latest\"";
|
|
2653
|
+
readonly type: "string";
|
|
2654
|
+
}, {
|
|
2655
|
+
readonly key: "enrichment_sensitivity_ceiling";
|
|
2656
|
+
readonly value: "\"internal\"";
|
|
2657
|
+
readonly type: "string";
|
|
2264
2658
|
}, {
|
|
2265
2659
|
readonly key: "entity_custom_fields_guard";
|
|
2266
2660
|
readonly value: "false";
|
|
@@ -2281,6 +2675,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2281
2675
|
readonly key: "field_sensitivity_levels";
|
|
2282
2676
|
readonly value: "{\"edit\": {\"public\": \"editor\", \"internal\": \"editor\", \"restricted\": \"admin\", \"confidential\": \"admin\"}, \"read\": {\"public\": \"viewer\", \"internal\": \"viewer\", \"restricted\": \"admin\", \"confidential\": \"editor\"}}";
|
|
2283
2677
|
readonly type: "json";
|
|
2678
|
+
}, {
|
|
2679
|
+
readonly key: "inbound_domain";
|
|
2680
|
+
readonly value: "\"inbound.matrxserver.com\"";
|
|
2681
|
+
readonly type: "string";
|
|
2284
2682
|
}, {
|
|
2285
2683
|
readonly key: "member_default_level";
|
|
2286
2684
|
readonly value: "\"viewer\"";
|
|
@@ -2342,13 +2740,16 @@ declare const STORE_KNOBS: readonly [{
|
|
|
2342
2740
|
*/
|
|
2343
2741
|
declare const STORE_REFUSAL_CODES: readonly [{
|
|
2344
2742
|
readonly code: "02000";
|
|
2345
|
-
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";
|
|
2743
|
+
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";
|
|
2346
2744
|
}, {
|
|
2347
2745
|
readonly code: "0A000";
|
|
2348
|
-
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";
|
|
2746
|
+
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";
|
|
2747
|
+
}, {
|
|
2748
|
+
readonly code: "22003";
|
|
2749
|
+
readonly raised_by: "context_resolve";
|
|
2349
2750
|
}, {
|
|
2350
2751
|
readonly code: "22004";
|
|
2351
|
-
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,
|
|
2752
|
+
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";
|
|
2352
2753
|
}, {
|
|
2353
2754
|
readonly code: "22007";
|
|
2354
2755
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -2357,28 +2758,28 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
2357
2758
|
readonly raised_by: "rule_eval";
|
|
2358
2759
|
}, {
|
|
2359
2760
|
readonly code: "22023";
|
|
2360
|
-
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,
|
|
2761
|
+
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";
|
|
2361
2762
|
}, {
|
|
2362
2763
|
readonly code: "23503";
|
|
2363
|
-
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";
|
|
2764
|
+
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";
|
|
2364
2765
|
}, {
|
|
2365
2766
|
readonly code: "23505";
|
|
2366
|
-
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";
|
|
2767
|
+
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";
|
|
2367
2768
|
}, {
|
|
2368
2769
|
readonly code: "23514";
|
|
2369
|
-
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";
|
|
2770
|
+
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";
|
|
2370
2771
|
}, {
|
|
2371
2772
|
readonly code: "40001";
|
|
2372
2773
|
readonly raised_by: "has_visibility_at";
|
|
2373
2774
|
}, {
|
|
2374
2775
|
readonly code: "42501";
|
|
2375
|
-
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";
|
|
2776
|
+
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";
|
|
2376
2777
|
}, {
|
|
2377
2778
|
readonly code: "42703";
|
|
2378
2779
|
readonly raised_by: "entity_table,portal_declare";
|
|
2379
2780
|
}, {
|
|
2380
2781
|
readonly code: "53400";
|
|
2381
|
-
readonly raised_by: "anon_rate_take,delete_cascade_closure,promote_field";
|
|
2782
|
+
readonly raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field";
|
|
2382
2783
|
}, {
|
|
2383
2784
|
readonly code: "54001";
|
|
2384
2785
|
readonly raised_by: "record_delete";
|
|
@@ -3263,6 +3664,189 @@ interface FormSummary {
|
|
|
3263
3664
|
*/
|
|
3264
3665
|
declare function publicFormPath(formId: string): string;
|
|
3265
3666
|
|
|
3667
|
+
/** What the store thinks one column of a file is. */
|
|
3668
|
+
interface ImportColumnPlan {
|
|
3669
|
+
/** The heading exactly as the file spells it. */
|
|
3670
|
+
header: string;
|
|
3671
|
+
/** Set when this table already has the column; then `type` is that Field's. */
|
|
3672
|
+
field_id: Uuid | null;
|
|
3673
|
+
/** The key this column would become, or the key it matched. */
|
|
3674
|
+
field_key: string;
|
|
3675
|
+
label: string;
|
|
3676
|
+
/**
|
|
3677
|
+
* A parity type, or one of the three plain words (`text`, `long_text`,
|
|
3678
|
+
* `number`). It is exactly what `custom.field_declare` takes, so a plan can be
|
|
3679
|
+
* handed on with nothing in between to reinterpret it.
|
|
3680
|
+
*/
|
|
3681
|
+
type: ParityFieldType | "text" | "long_text" | "number" | "relation";
|
|
3682
|
+
matched: boolean;
|
|
3683
|
+
/** One sentence, in words a person reads, saying why the store said that. */
|
|
3684
|
+
why: string;
|
|
3685
|
+
/** Present on a money column. */
|
|
3686
|
+
unit?: string;
|
|
3687
|
+
/** Present when the store read the column as a dropdown: its words. */
|
|
3688
|
+
options?: string[];
|
|
3689
|
+
/** Present when the column points at another Table. */
|
|
3690
|
+
relation_target?: Uuid;
|
|
3691
|
+
/** A slashed date whose day/month order cannot be read off the file. */
|
|
3692
|
+
ambiguous?: boolean;
|
|
3693
|
+
/** Another column of the same file would make the same key. */
|
|
3694
|
+
collides_with?: string;
|
|
3695
|
+
samples?: unknown[];
|
|
3696
|
+
}
|
|
3697
|
+
interface ImportPlan {
|
|
3698
|
+
table_id: Uuid;
|
|
3699
|
+
columns: ImportColumnPlan[];
|
|
3700
|
+
matched: number;
|
|
3701
|
+
unmatched: number;
|
|
3702
|
+
fields: Array<{
|
|
3703
|
+
field_id: Uuid;
|
|
3704
|
+
key: string;
|
|
3705
|
+
label: string;
|
|
3706
|
+
type: string | null;
|
|
3707
|
+
}>;
|
|
3708
|
+
}
|
|
3709
|
+
/** What a run does when it meets something. Both defaults cannot lose anything. */
|
|
3710
|
+
interface ImportPolicy {
|
|
3711
|
+
/** `skip` leaves the record that is already there; `update` brings it up to date. */
|
|
3712
|
+
on_duplicate?: "skip" | "update";
|
|
3713
|
+
/** `propose` sends a new column to the ONE approvals inbox. `create` is an admin's. */
|
|
3714
|
+
unmapped?: "propose" | "create" | "ignore";
|
|
3715
|
+
/** How a slashed date is read. Chosen once for the run, never guessed per row. */
|
|
3716
|
+
date_order?: "mdy" | "dmy";
|
|
3717
|
+
}
|
|
3718
|
+
interface ImportOpened {
|
|
3719
|
+
import_id: Uuid;
|
|
3720
|
+
state: "open" | "written" | "finished";
|
|
3721
|
+
/**
|
|
3722
|
+
* TRUE means these exact bytes already landed on this Table and NOTHING was
|
|
3723
|
+
* written again. The numbers are the FIRST run's.
|
|
3724
|
+
*/
|
|
3725
|
+
already: boolean;
|
|
3726
|
+
rows_seen: number;
|
|
3727
|
+
rows_written: number;
|
|
3728
|
+
rows_duplicate: number;
|
|
3729
|
+
source_name: string | null;
|
|
3730
|
+
opened_at?: Timestamp;
|
|
3731
|
+
message: string;
|
|
3732
|
+
}
|
|
3733
|
+
/** One row of the file, and what became of it. */
|
|
3734
|
+
type ImportOutcome = {
|
|
3735
|
+
row: number;
|
|
3736
|
+
outcome: "landed";
|
|
3737
|
+
record_id: Uuid;
|
|
3738
|
+
} | {
|
|
3739
|
+
row: number;
|
|
3740
|
+
outcome: "duplicate";
|
|
3741
|
+
record_id: Uuid;
|
|
3742
|
+
updated: boolean;
|
|
3743
|
+
reason: string;
|
|
3744
|
+
} | {
|
|
3745
|
+
row: number;
|
|
3746
|
+
outcome: "refused";
|
|
3747
|
+
reason: string;
|
|
3748
|
+
source: Record<string, unknown>;
|
|
3749
|
+
};
|
|
3750
|
+
interface ImportProposal {
|
|
3751
|
+
column: string;
|
|
3752
|
+
field_key: string;
|
|
3753
|
+
label: string;
|
|
3754
|
+
type: string;
|
|
3755
|
+
why: string;
|
|
3756
|
+
samples: unknown[];
|
|
3757
|
+
state: "proposed" | "waiting" | "accepted" | "rejected" | "ignored" | "refused";
|
|
3758
|
+
/** Set once the column is waiting in the approvals inbox. */
|
|
3759
|
+
approval_id?: Uuid;
|
|
3760
|
+
/** Set once an admin added it outright. */
|
|
3761
|
+
field_id?: Uuid;
|
|
3762
|
+
reason?: string;
|
|
3763
|
+
options?: string[];
|
|
3764
|
+
unit?: string;
|
|
3765
|
+
relation_target?: Uuid;
|
|
3766
|
+
}
|
|
3767
|
+
interface ImportBatchResult {
|
|
3768
|
+
import_id: Uuid;
|
|
3769
|
+
rows_seen: number;
|
|
3770
|
+
rows_written: number;
|
|
3771
|
+
rows_duplicate: number;
|
|
3772
|
+
rows_refused: number;
|
|
3773
|
+
outcomes: ImportOutcome[];
|
|
3774
|
+
proposals: ImportProposal[];
|
|
3775
|
+
}
|
|
3776
|
+
interface ImportFinished {
|
|
3777
|
+
import_id: Uuid;
|
|
3778
|
+
state: "finished";
|
|
3779
|
+
rows_seen: number;
|
|
3780
|
+
rows_written: number;
|
|
3781
|
+
rows_duplicate: number;
|
|
3782
|
+
rows_refused: number;
|
|
3783
|
+
columns_offered: number;
|
|
3784
|
+
columns_added: number;
|
|
3785
|
+
columns_ignored: number;
|
|
3786
|
+
proposals: ImportProposal[];
|
|
3787
|
+
message: string;
|
|
3788
|
+
}
|
|
3789
|
+
/**
|
|
3790
|
+
* The rows a person clicks through to. `capped` and `note` are the store saying
|
|
3791
|
+
* out loud which part of the total it can still show — a number with nothing
|
|
3792
|
+
* behind it is the thing this shape exists to prevent.
|
|
3793
|
+
*/
|
|
3794
|
+
interface ImportReport {
|
|
3795
|
+
import_id: Uuid;
|
|
3796
|
+
table_id: Uuid;
|
|
3797
|
+
state: "refused" | "duplicate";
|
|
3798
|
+
rows: Array<Record<string, unknown>>;
|
|
3799
|
+
kept: number;
|
|
3800
|
+
total: number;
|
|
3801
|
+
capped: boolean;
|
|
3802
|
+
note: string | null;
|
|
3803
|
+
}
|
|
3804
|
+
interface ImportRun {
|
|
3805
|
+
import_id: Uuid;
|
|
3806
|
+
table_id: Uuid;
|
|
3807
|
+
format: "csv" | "xlsx";
|
|
3808
|
+
source_name: string | null;
|
|
3809
|
+
file_hash: string | null;
|
|
3810
|
+
dedupe_key: string | null;
|
|
3811
|
+
policy: ImportPolicy;
|
|
3812
|
+
state: string;
|
|
3813
|
+
rows_seen: number;
|
|
3814
|
+
rows_written: number;
|
|
3815
|
+
rows_duplicate: number;
|
|
3816
|
+
rows_refused: number;
|
|
3817
|
+
columns_offered: number;
|
|
3818
|
+
opened_at: Timestamp;
|
|
3819
|
+
finished_at: Timestamp | null;
|
|
3820
|
+
created_by: Uuid | null;
|
|
3821
|
+
}
|
|
3822
|
+
/** DOOR-19. An address a Table owns, and what has arrived at it. */
|
|
3823
|
+
interface InboundAddress {
|
|
3824
|
+
inbound_id: Uuid;
|
|
3825
|
+
table_id: Uuid | null;
|
|
3826
|
+
channel: string;
|
|
3827
|
+
address: string;
|
|
3828
|
+
source: string | null;
|
|
3829
|
+
enabled: boolean;
|
|
3830
|
+
last_received_at: Timestamp | null;
|
|
3831
|
+
created_at: Timestamp;
|
|
3832
|
+
received: number;
|
|
3833
|
+
}
|
|
3834
|
+
interface InboundDeclared {
|
|
3835
|
+
inbound_id: Uuid;
|
|
3836
|
+
table_id: Uuid;
|
|
3837
|
+
address: string;
|
|
3838
|
+
channel: string;
|
|
3839
|
+
enabled: boolean;
|
|
3840
|
+
/**
|
|
3841
|
+
* THE ONE THING THAT COULD FAIL SILENTLY, SAID OUT LOUD. The address is real
|
|
3842
|
+
* and stored the moment this comes back; whether mail REACHES it is a fact
|
|
3843
|
+
* about DNS that no door can make true. Show this sentence wherever the
|
|
3844
|
+
* address is shown.
|
|
3845
|
+
*/
|
|
3846
|
+
mail_route: string;
|
|
3847
|
+
message: string;
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3266
3850
|
/** One portal as `custom.portals` reports it to its organization. */
|
|
3267
3851
|
interface PortalSummary {
|
|
3268
3852
|
portal_id: Uuid;
|
|
@@ -3521,6 +4105,174 @@ interface DashboardRunResult {
|
|
|
3521
4105
|
blocks: DashboardBlockResult[];
|
|
3522
4106
|
}
|
|
3523
4107
|
|
|
4108
|
+
/** VAL-8's whole vocabulary. There is no fourth word. */
|
|
4109
|
+
type HistoryActorKind = "user" | "agent" | "system";
|
|
4110
|
+
/**
|
|
4111
|
+
* WHO WROTE A VERSION.
|
|
4112
|
+
*
|
|
4113
|
+
* `kind` is the store's own word for the author. `name` is a person as a person
|
|
4114
|
+
* reads them — never a uuid; SCR-N-5 forbids printing one at a customer.
|
|
4115
|
+
* `on_behalf_of` is present only for an agent, and for an agent it is ALWAYS
|
|
4116
|
+
* present: an agent carries the exact authority of the person operating it
|
|
4117
|
+
* (AGT-N-4), so a screen that showed the machine without the person would be
|
|
4118
|
+
* hiding who is answerable.
|
|
4119
|
+
*/
|
|
4120
|
+
interface HistoryActor {
|
|
4121
|
+
kind: HistoryActorKind;
|
|
4122
|
+
user_id: Uuid | null;
|
|
4123
|
+
name: string | null;
|
|
4124
|
+
on_behalf_of: {
|
|
4125
|
+
user_id: Uuid;
|
|
4126
|
+
name: string | null;
|
|
4127
|
+
} | null;
|
|
4128
|
+
}
|
|
4129
|
+
/**
|
|
4130
|
+
* ONE FIELD THAT MOVED, with what it said before and what it says after.
|
|
4131
|
+
*
|
|
4132
|
+
* `label` is the Field's own label, so a timeline reads "Price" and not
|
|
4133
|
+
* `day_rate`. `rule` is FLD-9's computed provenance AT THAT VERSION — which
|
|
4134
|
+
* Rule, and which VERSION of the Rule, produced a derived value. `source` is
|
|
4135
|
+
* VAL-1's provenance, resolved from the pointer the document interns it under,
|
|
4136
|
+
* so a screen never prints `s3` at anybody.
|
|
4137
|
+
*/
|
|
4138
|
+
interface HistoryChange {
|
|
4139
|
+
key: string;
|
|
4140
|
+
field_id: Uuid | null;
|
|
4141
|
+
label: string;
|
|
4142
|
+
before: unknown;
|
|
4143
|
+
after: unknown;
|
|
4144
|
+
rule: {
|
|
4145
|
+
rule_id: Uuid;
|
|
4146
|
+
rule_version: number;
|
|
4147
|
+
computed_at: Timestamp;
|
|
4148
|
+
} | null;
|
|
4149
|
+
source: Record<string, unknown> | null;
|
|
4150
|
+
/** VAL-2: why a value is absent — never asked, none, refused, conflicting. */
|
|
4151
|
+
absent_reason: string | null;
|
|
4152
|
+
/** VAL-3: the other candidates the store kept, in rank order. */
|
|
4153
|
+
alternates: unknown[] | null;
|
|
4154
|
+
}
|
|
4155
|
+
/** One version of one record, as `custom.record_history` answers it, newest first. */
|
|
4156
|
+
interface RecordHistoryEntry {
|
|
4157
|
+
version: number;
|
|
4158
|
+
occurred_at: Timestamp;
|
|
4159
|
+
/** The machine word: `edit`, `merge`, `undo of merge`, `insert`… */
|
|
4160
|
+
operation: string;
|
|
4161
|
+
/** The same thing in the word a person used: "edited", "merge", "created". */
|
|
4162
|
+
operation_label: string;
|
|
4163
|
+
actor: HistoryActor;
|
|
4164
|
+
changes: HistoryChange[];
|
|
4165
|
+
/** Set when a compound verb wrote this version (HIS-8). */
|
|
4166
|
+
migration_id: Uuid | null;
|
|
4167
|
+
/**
|
|
4168
|
+
* HIS-8: this version was written by a compound operation whose Migration log
|
|
4169
|
+
* row is still there, so the WHOLE operation can be undone through
|
|
4170
|
+
* `custom.migrate_undo`. An ordinary edit is never "undoable" in that sense —
|
|
4171
|
+
* it is RESTORABLE, which is a different verb and a different button.
|
|
4172
|
+
*/
|
|
4173
|
+
undoable: boolean;
|
|
4174
|
+
}
|
|
4175
|
+
/**
|
|
4176
|
+
* ONE CHANGE TO ONE COLUMN, ANYWHERE IN A TABLE — the half of the question no
|
|
4177
|
+
* revision panel answers. Airtable and Notion both make you open each record
|
|
4178
|
+
* and look. Only records this person may see contribute, decided as a predicate
|
|
4179
|
+
* in the same statement rather than a filter afterwards.
|
|
4180
|
+
*/
|
|
4181
|
+
interface FieldHistoryEntry {
|
|
4182
|
+
record_id: Uuid;
|
|
4183
|
+
/** The Table's own title field, so a row names a record and not a uuid. */
|
|
4184
|
+
record_title: string;
|
|
4185
|
+
version: number;
|
|
4186
|
+
occurred_at: Timestamp;
|
|
4187
|
+
operation_label: string;
|
|
4188
|
+
actor: HistoryActor;
|
|
4189
|
+
before: unknown;
|
|
4190
|
+
after: unknown;
|
|
4191
|
+
}
|
|
4192
|
+
/**
|
|
4193
|
+
* WHAT A RESTORE WOULD DO, BEFORE IT DOES IT.
|
|
4194
|
+
*
|
|
4195
|
+
* `before` on each change is what the record says NOW and `after` is what it
|
|
4196
|
+
* would say. A key the target version did not have comes back with `after` of
|
|
4197
|
+
* `null` — the screen says "cleared", because that is what the write does to
|
|
4198
|
+
* it. Computed by the same body that computes the write, so the sentence and
|
|
4199
|
+
* the act cannot drift.
|
|
4200
|
+
*/
|
|
4201
|
+
interface RestorePreview {
|
|
4202
|
+
record_id: Uuid;
|
|
4203
|
+
from_version: number;
|
|
4204
|
+
to_version: number;
|
|
4205
|
+
saved_at: Timestamp;
|
|
4206
|
+
/** Present when the preview is for one column rather than the whole record. */
|
|
4207
|
+
field_key: string | null;
|
|
4208
|
+
changes: HistoryChange[];
|
|
4209
|
+
count: number;
|
|
4210
|
+
}
|
|
4211
|
+
/** What a restore actually did. A NEW version, always. */
|
|
4212
|
+
interface RestoreResult {
|
|
4213
|
+
record_id: Uuid;
|
|
4214
|
+
restored_from_version: number;
|
|
4215
|
+
/** The version the restore WROTE. */
|
|
4216
|
+
version: number;
|
|
4217
|
+
changed: HistoryChange[];
|
|
4218
|
+
count: number;
|
|
4219
|
+
/** Always `false`, and said out loud because it is what people fear. */
|
|
4220
|
+
history_rewritten: boolean;
|
|
4221
|
+
/** Present on a single-value restore. */
|
|
4222
|
+
field_key?: string;
|
|
4223
|
+
}
|
|
4224
|
+
/** One comment, with the people on it named. */
|
|
4225
|
+
interface RecordComment {
|
|
4226
|
+
id: Uuid;
|
|
4227
|
+
body: string;
|
|
4228
|
+
anchor: Record<string, unknown>;
|
|
4229
|
+
/**
|
|
4230
|
+
* The column this comment is about, when it is about one. Notion anchors a
|
|
4231
|
+
* comment to a block; here the block is a Field, so "this price looks wrong"
|
|
4232
|
+
* sits on the price instead of at the bottom of the record.
|
|
4233
|
+
*/
|
|
4234
|
+
field_key: string | null;
|
|
4235
|
+
parent_comment_id: Uuid | null;
|
|
4236
|
+
created_by: Uuid;
|
|
4237
|
+
created_by_name: string;
|
|
4238
|
+
created_at: Timestamp;
|
|
4239
|
+
resolved_at: Timestamp | null;
|
|
4240
|
+
resolved_by: Uuid | null;
|
|
4241
|
+
resolved_by_name: string | null;
|
|
4242
|
+
mentions: Array<{
|
|
4243
|
+
user_id: Uuid;
|
|
4244
|
+
name: string;
|
|
4245
|
+
}>;
|
|
4246
|
+
/** Mine, so a screen offers Resolve on my own and Reply on everybody's. */
|
|
4247
|
+
mine: boolean;
|
|
4248
|
+
}
|
|
4249
|
+
/**
|
|
4250
|
+
* A RECORD'S WHOLE THREAD, AND WHAT THIS PERSON MAY DO IN IT.
|
|
4251
|
+
*
|
|
4252
|
+
* The two booleans come from the STORE, in the same call that answers the
|
|
4253
|
+
* thread, because a composer drawn for somebody the write door will refuse is
|
|
4254
|
+
* the defect lane UI-HONEST spent a night removing. `commenter` is the second
|
|
4255
|
+
* rung: a viewer reads the conversation and cannot join it, which is exactly
|
|
4256
|
+
* what the two rungs mean.
|
|
4257
|
+
*/
|
|
4258
|
+
interface CommentThreadRead {
|
|
4259
|
+
record_id: Uuid;
|
|
4260
|
+
comments: RecordComment[];
|
|
4261
|
+
may_comment: boolean;
|
|
4262
|
+
may_resolve: boolean;
|
|
4263
|
+
}
|
|
4264
|
+
/** What `custom.comment_write` answers. */
|
|
4265
|
+
interface CommentWritten {
|
|
4266
|
+
comment_id: Uuid;
|
|
4267
|
+
mentioned: Uuid[];
|
|
4268
|
+
/**
|
|
4269
|
+
* How many people were actually TOLD. "I mentioned three people" and "three
|
|
4270
|
+
* people were told" are different facts and a screen that conflates them is
|
|
4271
|
+
* lying quietly.
|
|
4272
|
+
*/
|
|
4273
|
+
notified: number;
|
|
4274
|
+
}
|
|
4275
|
+
|
|
3524
4276
|
/** One token found in a body, in the order it appears. */
|
|
3525
4277
|
interface DocToken {
|
|
3526
4278
|
ordinal: number;
|
|
@@ -4023,6 +4775,185 @@ interface WorkAssignment {
|
|
|
4023
4775
|
message: string;
|
|
4024
4776
|
}
|
|
4025
4777
|
|
|
4778
|
+
/** What a step asks for before it counts as done. Every one of these is CHECKED. */
|
|
4779
|
+
type ChecklistRequirementKind =
|
|
4780
|
+
/** A person says it is done. */
|
|
4781
|
+
"none"
|
|
4782
|
+
/** A sentence of evidence, under `note`. */
|
|
4783
|
+
| "note"
|
|
4784
|
+
/** A named value filled in on the step itself. */
|
|
4785
|
+
| "answer"
|
|
4786
|
+
/** A named Field on the record the run is about must hold a value. */
|
|
4787
|
+
| "record_field"
|
|
4788
|
+
/** The step IS a form (SCR-19): finishing it needs a response record. */
|
|
4789
|
+
| "form"
|
|
4790
|
+
/** The step IS a document from a doc template (REC-68): finishing it needs a render. */
|
|
4791
|
+
| "document";
|
|
4792
|
+
interface ChecklistRequirement {
|
|
4793
|
+
kind: ChecklistRequirementKind;
|
|
4794
|
+
/** For `answer` and `record_field`: which value. */
|
|
4795
|
+
key?: string;
|
|
4796
|
+
/** What a person is asked for, in their words. */
|
|
4797
|
+
label?: string;
|
|
4798
|
+
/** For `form`: the published form this step is. */
|
|
4799
|
+
form_id?: Uuid;
|
|
4800
|
+
/** For `document`: the doc template this step renders. */
|
|
4801
|
+
template_id?: Uuid;
|
|
4802
|
+
}
|
|
4803
|
+
/** One step of a checklist, as it is WRITTEN — not as it is run. */
|
|
4804
|
+
interface ChecklistStepSpec {
|
|
4805
|
+
/** The name the checklist refers to this step by; lower-case, unique. */
|
|
4806
|
+
ref: string;
|
|
4807
|
+
/** What a person reads in their work. */
|
|
4808
|
+
title: string;
|
|
4809
|
+
/** Which role owns it. A role the checklist never declares is refused at save. */
|
|
4810
|
+
role?: string;
|
|
4811
|
+
/** How many days after the run starts it is due. */
|
|
4812
|
+
due_days?: number;
|
|
4813
|
+
/** Steps it waits for. A step waits only for steps listed above it. */
|
|
4814
|
+
depends_on?: string[];
|
|
4815
|
+
requires?: ChecklistRequirement;
|
|
4816
|
+
}
|
|
4817
|
+
/** A role, and the person who stands in it by default. */
|
|
4818
|
+
interface ChecklistRoleSpec {
|
|
4819
|
+
role: string;
|
|
4820
|
+
label?: string;
|
|
4821
|
+
user_id?: Uuid | null;
|
|
4822
|
+
}
|
|
4823
|
+
/** What starts a run. */
|
|
4824
|
+
type ChecklistTriggerKind = "manual" | "record_created" | "status_reached";
|
|
4825
|
+
interface ChecklistTrigger {
|
|
4826
|
+
kind: ChecklistTriggerKind;
|
|
4827
|
+
/** The Table being watched, for the two kinds that watch one. */
|
|
4828
|
+
table_id?: Uuid;
|
|
4829
|
+
/** The state, for `status_reached`. */
|
|
4830
|
+
status?: string;
|
|
4831
|
+
}
|
|
4832
|
+
/** THE COMPLETE DECLARATIVE CHECKLIST — one object, one call, a whole process. */
|
|
4833
|
+
interface ChecklistSpec {
|
|
4834
|
+
name: string;
|
|
4835
|
+
/** The Table a run is ABOUT: People, Hires, Jobs, Matters. */
|
|
4836
|
+
about_table_id: Uuid;
|
|
4837
|
+
roles?: ChecklistRoleSpec[];
|
|
4838
|
+
trigger?: ChecklistTrigger;
|
|
4839
|
+
steps: ChecklistStepSpec[];
|
|
4840
|
+
}
|
|
4841
|
+
/** What `custom.checklist_declare` answers. */
|
|
4842
|
+
interface ChecklistDeclared {
|
|
4843
|
+
template_id: Uuid;
|
|
4844
|
+
name: string;
|
|
4845
|
+
about_table_id: Uuid;
|
|
4846
|
+
steps_table_id: Uuid;
|
|
4847
|
+
steps: number;
|
|
4848
|
+
roles: number;
|
|
4849
|
+
trigger: ChecklistTrigger;
|
|
4850
|
+
created: boolean;
|
|
4851
|
+
message: string;
|
|
4852
|
+
ms: number;
|
|
4853
|
+
}
|
|
4854
|
+
/** One row of `custom.checklist_templates`. */
|
|
4855
|
+
interface ChecklistTemplateSummary {
|
|
4856
|
+
template_id: Uuid;
|
|
4857
|
+
name: string;
|
|
4858
|
+
about_table_id: Uuid | null;
|
|
4859
|
+
about_table: string | null;
|
|
4860
|
+
steps: number;
|
|
4861
|
+
roles: number;
|
|
4862
|
+
trigger_kind: ChecklistTriggerKind;
|
|
4863
|
+
trigger_status: string | null;
|
|
4864
|
+
open_runs: number;
|
|
4865
|
+
total_runs: number;
|
|
4866
|
+
updated_at: Timestamp;
|
|
4867
|
+
}
|
|
4868
|
+
/** `custom.checklist_template_shape` — the spec, plus what the editor needs. */
|
|
4869
|
+
type ChecklistTemplateShape = ChecklistSpec & {
|
|
4870
|
+
template_id: Uuid;
|
|
4871
|
+
steps_table_id: Uuid | null;
|
|
4872
|
+
may_change: boolean;
|
|
4873
|
+
};
|
|
4874
|
+
/** What `custom.checklist_start` answers. */
|
|
4875
|
+
interface ChecklistRunStarted {
|
|
4876
|
+
run_id: Uuid;
|
|
4877
|
+
template_id: Uuid;
|
|
4878
|
+
template: string;
|
|
4879
|
+
about_record_id: Uuid | null;
|
|
4880
|
+
about: string | null;
|
|
4881
|
+
steps_table_id: Uuid;
|
|
4882
|
+
steps_created: number;
|
|
4883
|
+
assigned: number;
|
|
4884
|
+
unassigned: number;
|
|
4885
|
+
origin: string;
|
|
4886
|
+
steps: Array<{
|
|
4887
|
+
ref: string;
|
|
4888
|
+
step_id: Uuid;
|
|
4889
|
+
title: string;
|
|
4890
|
+
role: string | null;
|
|
4891
|
+
}>;
|
|
4892
|
+
/** Roles nobody is named for, so the screen can say so rather than show blanks. */
|
|
4893
|
+
waiting_on_a_name: string[];
|
|
4894
|
+
message: string;
|
|
4895
|
+
ms: number;
|
|
4896
|
+
}
|
|
4897
|
+
/** One step of a RUN, as `custom.checklist_run` answers it. */
|
|
4898
|
+
interface ChecklistRunStep {
|
|
4899
|
+
step_id: Uuid;
|
|
4900
|
+
step_order: number;
|
|
4901
|
+
ref: string;
|
|
4902
|
+
title: string;
|
|
4903
|
+
role: string | null;
|
|
4904
|
+
assignee_name: string | null;
|
|
4905
|
+
assignee_user_id: Uuid | null;
|
|
4906
|
+
due_on: Timestamp | null;
|
|
4907
|
+
due_state: WorkDueState;
|
|
4908
|
+
status: string | null;
|
|
4909
|
+
finished: boolean;
|
|
4910
|
+
requires: ChecklistRequirementKind;
|
|
4911
|
+
/**
|
|
4912
|
+
* The key the answer is filed under, as the checklist named it. A screen files
|
|
4913
|
+
* evidence under THIS, never under a name it invented — the store looks for
|
|
4914
|
+
* exactly this key and nothing else.
|
|
4915
|
+
*/
|
|
4916
|
+
requires_key: string | null;
|
|
4917
|
+
requires_label: string | null;
|
|
4918
|
+
/** The form or the document template this step is, when it is one. */
|
|
4919
|
+
requires_id: Uuid | null;
|
|
4920
|
+
evidence: Record<string, unknown>;
|
|
4921
|
+
/** The titles of the steps it is still waiting for. */
|
|
4922
|
+
blocked_by: string[];
|
|
4923
|
+
may_complete: boolean;
|
|
4924
|
+
/** Why it cannot be finished right now, in the words a person would use. */
|
|
4925
|
+
refusal: string | null;
|
|
4926
|
+
}
|
|
4927
|
+
/** One row of `custom.checklist_runs`. */
|
|
4928
|
+
interface ChecklistRunSummary {
|
|
4929
|
+
run_id: Uuid;
|
|
4930
|
+
name: string;
|
|
4931
|
+
template_id: Uuid | null;
|
|
4932
|
+
template: string | null;
|
|
4933
|
+
about_record_id: Uuid | null;
|
|
4934
|
+
about: string | null;
|
|
4935
|
+
about_table_id: Uuid | null;
|
|
4936
|
+
started_at: Timestamp | null;
|
|
4937
|
+
started_by: Uuid | null;
|
|
4938
|
+
origin: string;
|
|
4939
|
+
step_count: number;
|
|
4940
|
+
done: number;
|
|
4941
|
+
overdue: number;
|
|
4942
|
+
next_step: string | null;
|
|
4943
|
+
next_due: Timestamp | null;
|
|
4944
|
+
closed_at: Timestamp | null;
|
|
4945
|
+
}
|
|
4946
|
+
/** What `custom.checklist_step_complete` answers. */
|
|
4947
|
+
interface ChecklistStepCompleted {
|
|
4948
|
+
step_id: Uuid;
|
|
4949
|
+
run_id?: Uuid;
|
|
4950
|
+
completed: boolean;
|
|
4951
|
+
evidence?: Record<string, unknown>;
|
|
4952
|
+
steps_left?: number;
|
|
4953
|
+
run_closed?: boolean;
|
|
4954
|
+
message: string;
|
|
4955
|
+
}
|
|
4956
|
+
|
|
4026
4957
|
/**
|
|
4027
4958
|
* VIS-31. A signed-in OUTSIDER, with the reason in plain English.
|
|
4028
4959
|
*
|
|
@@ -4352,6 +5283,104 @@ interface RecordsConfig {
|
|
|
4352
5283
|
schema?: string;
|
|
4353
5284
|
}
|
|
4354
5285
|
|
|
5286
|
+
/** One value the agent was given, with the triple that makes it citable. */
|
|
5287
|
+
interface RecordScopeField {
|
|
5288
|
+
key: string;
|
|
5289
|
+
label: string;
|
|
5290
|
+
type: string;
|
|
5291
|
+
value: unknown;
|
|
5292
|
+
/** DYN: a merge field resolves to a TRIPLE, not a string. */
|
|
5293
|
+
cite: {
|
|
5294
|
+
record_id: Uuid;
|
|
5295
|
+
field_id: Uuid;
|
|
5296
|
+
value_version: number;
|
|
5297
|
+
written_at: string | null;
|
|
5298
|
+
};
|
|
5299
|
+
}
|
|
5300
|
+
/** A Field the agent was NOT given, and which of the two reasons it is. */
|
|
5301
|
+
interface RecordScopeWithheld {
|
|
5302
|
+
key: string;
|
|
5303
|
+
label: string;
|
|
5304
|
+
because: "masked" | "policy";
|
|
5305
|
+
reason: string;
|
|
5306
|
+
needs?: string;
|
|
5307
|
+
/** The whole sentence, already written — a screen prints it rather than composing one. */
|
|
5308
|
+
says: string;
|
|
5309
|
+
}
|
|
5310
|
+
interface RecordScopeRelation {
|
|
5311
|
+
via: string;
|
|
5312
|
+
target_id: Uuid;
|
|
5313
|
+
foreign: boolean;
|
|
5314
|
+
masked: boolean;
|
|
5315
|
+
your_level: PermissionLevel | null;
|
|
5316
|
+
card: Record<string, unknown> | null;
|
|
5317
|
+
why: string | null;
|
|
5318
|
+
}
|
|
5319
|
+
interface RecordScopeHistoryEntry {
|
|
5320
|
+
version: number;
|
|
5321
|
+
at: string;
|
|
5322
|
+
what: string;
|
|
5323
|
+
who: string | null;
|
|
5324
|
+
changes: Array<Record<string, unknown>>;
|
|
5325
|
+
}
|
|
5326
|
+
interface RecordScopeComment {
|
|
5327
|
+
id: Uuid;
|
|
5328
|
+
body: string;
|
|
5329
|
+
created_at: string;
|
|
5330
|
+
created_by_name: string;
|
|
5331
|
+
field_key: string | null;
|
|
5332
|
+
}
|
|
5333
|
+
interface RecordScopeContext {
|
|
5334
|
+
record: {
|
|
5335
|
+
id: Uuid;
|
|
5336
|
+
title: string;
|
|
5337
|
+
table_id: Uuid;
|
|
5338
|
+
table_name: string | null;
|
|
5339
|
+
scope_type: string;
|
|
5340
|
+
plural: string;
|
|
5341
|
+
version: number;
|
|
5342
|
+
updated_at: string;
|
|
5343
|
+
your_level: PermissionLevel;
|
|
5344
|
+
};
|
|
5345
|
+
fields: RecordScopeField[];
|
|
5346
|
+
withheld: RecordScopeWithheld[];
|
|
5347
|
+
relations: RecordScopeRelation[];
|
|
5348
|
+
history: RecordScopeHistoryEntry[];
|
|
5349
|
+
comments: RecordScopeComment[];
|
|
5350
|
+
may_comment: boolean;
|
|
5351
|
+
siblings: {
|
|
5352
|
+
shown: Array<{
|
|
5353
|
+
id: Uuid;
|
|
5354
|
+
title: string;
|
|
5355
|
+
}>;
|
|
5356
|
+
more_than_shown: boolean;
|
|
5357
|
+
says: string;
|
|
5358
|
+
};
|
|
5359
|
+
/** Questions derived from THIS record's shape — never a fixed list. */
|
|
5360
|
+
suggested: string[];
|
|
5361
|
+
/** One sentence naming what is not in the conversation. Printed verbatim. */
|
|
5362
|
+
says: string;
|
|
5363
|
+
assembled_at: string;
|
|
5364
|
+
}
|
|
5365
|
+
/** What a conversation is about. `readable` false means the person lost access to it. */
|
|
5366
|
+
interface ConversationScope {
|
|
5367
|
+
bound: boolean;
|
|
5368
|
+
readable?: boolean;
|
|
5369
|
+
record_id?: Uuid;
|
|
5370
|
+
table_id?: Uuid;
|
|
5371
|
+
scope_type?: string;
|
|
5372
|
+
title?: string;
|
|
5373
|
+
bound_at?: string;
|
|
5374
|
+
bound_by?: Uuid;
|
|
5375
|
+
because?: string;
|
|
5376
|
+
}
|
|
5377
|
+
interface ConversationScopeContext {
|
|
5378
|
+
scope: ConversationScope;
|
|
5379
|
+
context: RecordScopeContext | null;
|
|
5380
|
+
}
|
|
5381
|
+
/** `About: Acme Industrial` — the chip a bound chat wears. */
|
|
5382
|
+
declare function scopeChip(scope: ConversationScope): string;
|
|
5383
|
+
|
|
4355
5384
|
/**
|
|
4356
5385
|
* DOOR-8. As-of on EITHER clock, and they are different questions:
|
|
4357
5386
|
* · `record` — the record clock: what this record looked like at version time.
|
|
@@ -4579,6 +5608,95 @@ interface RecordsClient {
|
|
|
4579
5608
|
form_id?: Uuid | null;
|
|
4580
5609
|
slug?: string | null;
|
|
4581
5610
|
}): Promise<RecordsResult<Uuid>>;
|
|
5611
|
+
/**
|
|
5612
|
+
* What the store makes of a file's columns, before anything is written.
|
|
5613
|
+
* `columns` is `[{header, samples}]` — the first page of the file is plenty.
|
|
5614
|
+
*/
|
|
5615
|
+
importPlan(args: {
|
|
5616
|
+
table_id: Uuid;
|
|
5617
|
+
columns: Array<{
|
|
5618
|
+
header: string;
|
|
5619
|
+
samples: unknown[];
|
|
5620
|
+
}>;
|
|
5621
|
+
}): Promise<RecordsResult<ImportPlan>>;
|
|
5622
|
+
/**
|
|
5623
|
+
* Open a run. `file_hash` is the run's IDENTITY: the same bytes into the same
|
|
5624
|
+
* table a second time answer the FIRST run with `already: true` and write
|
|
5625
|
+
* nothing, so a re-import doubles nothing. `force` re-opens deliberately.
|
|
5626
|
+
*/
|
|
5627
|
+
importBegin(args: {
|
|
5628
|
+
table_id: Uuid;
|
|
5629
|
+
format?: "csv" | "xlsx";
|
|
5630
|
+
source_name?: string | null;
|
|
5631
|
+
source_columns?: unknown[];
|
|
5632
|
+
file_hash?: string | null;
|
|
5633
|
+
policy?: ImportPolicy;
|
|
5634
|
+
/** A Field key. A row whose value for it is already here is a duplicate. */
|
|
5635
|
+
dedupe_key?: string | null;
|
|
5636
|
+
file_bytes?: number | null;
|
|
5637
|
+
force?: boolean;
|
|
5638
|
+
}): Promise<RecordsResult<ImportOpened>>;
|
|
5639
|
+
/**
|
|
5640
|
+
* One BATCH of rows. Every row is written through the ONE write door inside
|
|
5641
|
+
* its own subtransaction, so a refused row leaves nothing behind and never
|
|
5642
|
+
* costs the rows before it. Send a few hundred at a time.
|
|
5643
|
+
*/
|
|
5644
|
+
importRows(args: {
|
|
5645
|
+
import_id: Uuid;
|
|
5646
|
+
rows: Array<Record<string, unknown>>;
|
|
5647
|
+
/** Header -> Field key. A header that already spells a key needs no entry. */
|
|
5648
|
+
mapping?: Record<string, string>;
|
|
5649
|
+
}): Promise<RecordsResult<ImportBatchResult>>;
|
|
5650
|
+
/**
|
|
5651
|
+
* Close the run and decide the columns the file had and the table did not:
|
|
5652
|
+
* `propose` (the ONE approvals inbox, and the only choice a non-admin has),
|
|
5653
|
+
* `create` (an admin adds them outright) or `ignore`.
|
|
5654
|
+
*/
|
|
5655
|
+
importFinish(args: {
|
|
5656
|
+
import_id: Uuid;
|
|
5657
|
+
unmapped?: "propose" | "create" | "ignore";
|
|
5658
|
+
}): Promise<RecordsResult<ImportFinished>>;
|
|
5659
|
+
/** The refused rows, or the ones already here, WITH the source row on each. */
|
|
5660
|
+
importReport(args: {
|
|
5661
|
+
import_id: Uuid;
|
|
5662
|
+
state?: "refused" | "duplicate";
|
|
5663
|
+
limit?: number;
|
|
5664
|
+
offset?: number;
|
|
5665
|
+
}): Promise<RecordsResult<ImportReport>>;
|
|
5666
|
+
/** This organization's import runs, newest first. How you find yesterday's. */
|
|
5667
|
+
imports(args?: {
|
|
5668
|
+
table_id?: Uuid | null;
|
|
5669
|
+
limit?: number;
|
|
5670
|
+
}): Promise<RecordsResult<ImportRun[]>>;
|
|
5671
|
+
/**
|
|
5672
|
+
* Forget the RECEIPT for a file so the same bytes can be imported again
|
|
5673
|
+
* deliberately. Never touches the records that import wrote.
|
|
5674
|
+
*/
|
|
5675
|
+
importForget(args: {
|
|
5676
|
+
import_id: Uuid;
|
|
5677
|
+
}): Promise<RecordsResult<boolean>>;
|
|
5678
|
+
/**
|
|
5679
|
+
* Give a table its own address. The answer carries `mail_route`: the one
|
|
5680
|
+
* sentence saying what has to exist in DNS before anything arrives. Show it
|
|
5681
|
+
* wherever the address is shown — an address that silently swallows mail is
|
|
5682
|
+
* the failure this whole door is against.
|
|
5683
|
+
*/
|
|
5684
|
+
inboundDeclare(args: {
|
|
5685
|
+
table_id: Uuid;
|
|
5686
|
+
label?: string | null;
|
|
5687
|
+
}): Promise<RecordsResult<InboundDeclared>>;
|
|
5688
|
+
inboundAddresses(args?: {
|
|
5689
|
+
table_id?: Uuid | null;
|
|
5690
|
+
}): Promise<RecordsResult<InboundAddress[]>>;
|
|
5691
|
+
inboundSet(args: {
|
|
5692
|
+
inbound_id: Uuid;
|
|
5693
|
+
enabled: boolean;
|
|
5694
|
+
}): Promise<RecordsResult<{
|
|
5695
|
+
inbound_id: Uuid;
|
|
5696
|
+
address: string;
|
|
5697
|
+
enabled: boolean;
|
|
5698
|
+
message: string;
|
|
5699
|
+
}>>;
|
|
4582
5700
|
/** Every portal over this organization the caller may know about, with its numbers. */
|
|
4583
5701
|
portals(): Promise<RecordsResult<PortalSummary[]>>;
|
|
4584
5702
|
/** ONE portal in full: what it shows, and who it was opened to. */
|
|
@@ -4803,6 +5921,115 @@ interface RecordsClient {
|
|
|
4803
5921
|
revisions(args: {
|
|
4804
5922
|
record_id: Uuid;
|
|
4805
5923
|
}): Promise<RecordsResult<RecordRevision[]>>;
|
|
5924
|
+
/**
|
|
5925
|
+
* PRODUCTS row 4. One record's version list, newest first: who (a person, or
|
|
5926
|
+
* an agent AND the person it acted for), when, the operation in the word
|
|
5927
|
+
* somebody used, and every field that moved with its before, its after, the
|
|
5928
|
+
* Rule version that produced a derived value and its source pointer. Viewer
|
|
5929
|
+
* on the record — reading how something got to be the way it is is reading.
|
|
5930
|
+
*/
|
|
5931
|
+
recordHistory(args: {
|
|
5932
|
+
record_id: Uuid;
|
|
5933
|
+
limit?: number;
|
|
5934
|
+
offset?: number;
|
|
5935
|
+
}): Promise<RecordsResult<RecordHistoryEntry[]>>;
|
|
5936
|
+
/**
|
|
5937
|
+
* AGT-N-9 — EVERYTHING A CHAT OPENED ON THIS RECORD MAY KNOW, IN ONE ROUND TRIP.
|
|
5938
|
+
*
|
|
5939
|
+
* The Fields with their `(record, field, value version)` triples, the relations one hop
|
|
5940
|
+
* out, the history, the comments and the Table's other records — assembled INSIDE the
|
|
5941
|
+
* database, every piece through the read door, under this person's own field-level
|
|
5942
|
+
* security. A Field the store masks comes back in `withheld` with the store's own
|
|
5943
|
+
* sentence and no value; a Field the organization keeps out of conversations comes back
|
|
5944
|
+
* there too, saying which of the two it is.
|
|
5945
|
+
*/
|
|
5946
|
+
recordScopeContext(args: {
|
|
5947
|
+
record_id: Uuid;
|
|
5948
|
+
relations?: number;
|
|
5949
|
+
history?: number;
|
|
5950
|
+
siblings?: number;
|
|
5951
|
+
}): Promise<RecordsResult<RecordScopeContext>>;
|
|
5952
|
+
/** What is this conversation about? */
|
|
5953
|
+
conversationScope(args: {
|
|
5954
|
+
conversation_id: Uuid;
|
|
5955
|
+
}): Promise<RecordsResult<ConversationScope>>;
|
|
5956
|
+
/** Point a conversation at one record. Refused unless this person may open it. */
|
|
5957
|
+
conversationScopeBind(args: {
|
|
5958
|
+
conversation_id: Uuid;
|
|
5959
|
+
record_id: Uuid;
|
|
5960
|
+
}): Promise<RecordsResult<ConversationScope>>;
|
|
5961
|
+
/** This conversation is no longer about a particular record. */
|
|
5962
|
+
conversationScopeUnbind(args: {
|
|
5963
|
+
conversation_id: Uuid;
|
|
5964
|
+
}): Promise<RecordsResult<ConversationScope>>;
|
|
5965
|
+
/** The binding AND the context of a bound conversation, in one round trip. */
|
|
5966
|
+
conversationScopeContext(args: {
|
|
5967
|
+
conversation_id: Uuid;
|
|
5968
|
+
relations?: number;
|
|
5969
|
+
history?: number;
|
|
5970
|
+
siblings?: number;
|
|
5971
|
+
}): Promise<RecordsResult<ConversationScopeContext>>;
|
|
5972
|
+
/**
|
|
5973
|
+
* "Who changed the price on ANY record?" One column's history across a whole
|
|
5974
|
+
* Table, narrowed to the records this person may see by a predicate in the
|
|
5975
|
+
* same statement. A column that names no Field is refused BY NAME, never
|
|
5976
|
+
* answered empty.
|
|
5977
|
+
*/
|
|
5978
|
+
fieldHistory(args: {
|
|
5979
|
+
table_id: Uuid;
|
|
5980
|
+
field_key: string;
|
|
5981
|
+
limit?: number;
|
|
5982
|
+
offset?: number;
|
|
5983
|
+
record_id?: Uuid;
|
|
5984
|
+
}): Promise<RecordsResult<FieldHistoryEntry[]>>;
|
|
5985
|
+
/**
|
|
5986
|
+
* WHAT A RESTORE WOULD CHANGE, BEFORE IT DOES. Editor on the record: this is
|
|
5987
|
+
* the first half of an act, and somebody who may not perform it is not shown
|
|
5988
|
+
* its preview. Pass `field_key` for one column.
|
|
5989
|
+
*/
|
|
5990
|
+
restorePreview(args: {
|
|
5991
|
+
record_id: Uuid;
|
|
5992
|
+
version: number;
|
|
5993
|
+
field_key?: string;
|
|
5994
|
+
}): Promise<RecordsResult<RestorePreview>>;
|
|
5995
|
+
/** Put the whole record back to a version, as a NEW version. Editor. */
|
|
5996
|
+
restoreVersion(args: {
|
|
5997
|
+
record_id: Uuid;
|
|
5998
|
+
version: number;
|
|
5999
|
+
}): Promise<RecordsResult<RestoreResult>>;
|
|
6000
|
+
/** Put ONE column back to what it said at a version, as a NEW version (HIS-N-2). Editor. */
|
|
6001
|
+
valueRestore(args: {
|
|
6002
|
+
record_id: Uuid;
|
|
6003
|
+
field_key: string;
|
|
6004
|
+
version: number;
|
|
6005
|
+
}): Promise<RecordsResult<RestoreResult>>;
|
|
6006
|
+
/**
|
|
6007
|
+
* SCR-18. The record's comment thread with everybody named, plus what THIS
|
|
6008
|
+
* person may do in it — decided by the store, in the same call, so a screen
|
|
6009
|
+
* never draws a composer the write door will refuse.
|
|
6010
|
+
*/
|
|
6011
|
+
commentThread(args: {
|
|
6012
|
+
record_id: Uuid;
|
|
6013
|
+
include_resolved?: boolean;
|
|
6014
|
+
}): Promise<RecordsResult<CommentThreadRead>>;
|
|
6015
|
+
/**
|
|
6016
|
+
* Write a comment at the `commenter` rung, optionally naming people. A
|
|
6017
|
+
* mention is a reference and not a regex over the body: the ids come from the
|
|
6018
|
+
* picker and the store refuses one who is not in the organization, or who
|
|
6019
|
+
* cannot open the record — because that notification would be a dead end.
|
|
6020
|
+
*/
|
|
6021
|
+
commentWrite(args: {
|
|
6022
|
+
record_id: Uuid;
|
|
6023
|
+
body: string;
|
|
6024
|
+
field_key?: string;
|
|
6025
|
+
parent_comment_id?: Uuid;
|
|
6026
|
+
mentions?: Uuid[];
|
|
6027
|
+
}): Promise<RecordsResult<CommentWritten>>;
|
|
6028
|
+
/** Resolve (or re-open) a thread. `commenter` — resolution is not a delete. */
|
|
6029
|
+
commentResolve(args: {
|
|
6030
|
+
comment_id: Uuid;
|
|
6031
|
+
resolved?: boolean;
|
|
6032
|
+
}): Promise<RecordsResult<boolean>>;
|
|
4806
6033
|
/**
|
|
4807
6034
|
* Every value of one record WITH its envelope — its own version, who wrote
|
|
4808
6035
|
* it, who they were acting for and when. The timeline IS the record (REC-19);
|
|
@@ -4872,6 +6099,67 @@ interface RecordsClient {
|
|
|
4872
6099
|
form_id: Uuid;
|
|
4873
6100
|
published?: boolean;
|
|
4874
6101
|
}): Promise<RecordsResult<Timestamp | null>>;
|
|
6102
|
+
/**
|
|
6103
|
+
* What is wrong with a checklist somebody is writing, in the words they would
|
|
6104
|
+
* use. `null` means it is fine. Pure — it reads no row and writes nothing —
|
|
6105
|
+
* so an editor may ask it on every keystroke and the refusal arrives BEFORE
|
|
6106
|
+
* the save rather than after it.
|
|
6107
|
+
*/
|
|
6108
|
+
checklistRefusal(args: {
|
|
6109
|
+
spec: ChecklistSpec;
|
|
6110
|
+
}): Promise<RecordsResult<string | null>>;
|
|
6111
|
+
/**
|
|
6112
|
+
* Store a checklist, whole: ordered steps, who each belongs to by role, how
|
|
6113
|
+
* many days in each is due, what each waits for, what each asks for, and what
|
|
6114
|
+
* starts a run. Pass `template_id` to change the checklist that already
|
|
6115
|
+
* exists rather than making a second one.
|
|
6116
|
+
*/
|
|
6117
|
+
checklistDeclare(args: {
|
|
6118
|
+
spec: ChecklistSpec;
|
|
6119
|
+
template_id?: Uuid | null;
|
|
6120
|
+
}): Promise<RecordsResult<ChecklistDeclared>>;
|
|
6121
|
+
checklistTemplates(args?: {
|
|
6122
|
+
about_table_id?: Uuid | null;
|
|
6123
|
+
limit?: number;
|
|
6124
|
+
}): Promise<RecordsResult<ChecklistTemplateSummary[]>>;
|
|
6125
|
+
checklistTemplateShape(args: {
|
|
6126
|
+
template_id: Uuid;
|
|
6127
|
+
}): Promise<RecordsResult<ChecklistTemplateShape>>;
|
|
6128
|
+
/**
|
|
6129
|
+
* Run a checklist for one record: one work item per step in the ONE work
|
|
6130
|
+
* layer, assigned by role to real people, dated from the offsets,
|
|
6131
|
+
* dependencies carried across. `roles` names who stands in each role for THIS
|
|
6132
|
+
* run, over whatever the checklist says by default.
|
|
6133
|
+
*/
|
|
6134
|
+
checklistStart(args: {
|
|
6135
|
+
template_id: Uuid;
|
|
6136
|
+
about_record_id?: Uuid | null;
|
|
6137
|
+
roles?: Record<string, Uuid>;
|
|
6138
|
+
startingAt?: Timestamp | null;
|
|
6139
|
+
}): Promise<RecordsResult<ChecklistRunStarted>>;
|
|
6140
|
+
checklistRun(args: {
|
|
6141
|
+
run_id: Uuid;
|
|
6142
|
+
}): Promise<RecordsResult<ChecklistRunStep[]>>;
|
|
6143
|
+
checklistRuns(args?: {
|
|
6144
|
+
about_table_id?: Uuid | null;
|
|
6145
|
+
about_record_id?: Uuid | null;
|
|
6146
|
+
includeClosed?: boolean;
|
|
6147
|
+
limit?: number;
|
|
6148
|
+
}): Promise<RecordsResult<ChecklistRunSummary[]>>;
|
|
6149
|
+
/**
|
|
6150
|
+
* Tick a step off with whatever it asked for. Refused by name while a step it
|
|
6151
|
+
* waits for is open, or while what it asks for is missing — and the same
|
|
6152
|
+
* refusal meets `workSetState`, because the rule lives in the store and not
|
|
6153
|
+
* in this door.
|
|
6154
|
+
*/
|
|
6155
|
+
checklistStepComplete(args: {
|
|
6156
|
+
step_id: Uuid;
|
|
6157
|
+
evidence?: Record<string, unknown>;
|
|
6158
|
+
}): Promise<RecordsResult<ChecklistStepCompleted>>;
|
|
6159
|
+
/** Why this step cannot be finished right now. `null` means it can. */
|
|
6160
|
+
checklistStepRefusal(args: {
|
|
6161
|
+
step_id: Uuid;
|
|
6162
|
+
}): Promise<RecordsResult<string | null>>;
|
|
4875
6163
|
/** The five states and what each one may become. Asked, never hardcoded in a picker. */
|
|
4876
6164
|
workStates(): Promise<RecordsResult<WorkState[]>>;
|
|
4877
6165
|
/** Why this graph would be refused — asked BEFORE it is written. `null` means it is fine. */
|
|
@@ -5296,4 +6584,4 @@ declare function useFieldMutation(): UseFieldMutation;
|
|
|
5296
6584
|
*/
|
|
5297
6585
|
declare function useMergeField(key: string | null, state?: Record<string, unknown>): MergeFieldResolution | null;
|
|
5298
6586
|
|
|
5299
|
-
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 ComputeOn, type ContextPolicy, 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 FieldPatch, type FieldProposal, type FieldRule, type FieldSensitivity, type FieldSource, type FieldTypeWord, type ForbiddenEnvelopeWord, type FormSummary, type Freshness, type HiddenFieldNotice, type Home, 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 RecordDocument, type RecordRead, type RecordRevision, type RecordsActor, type RecordsConfig, type RecordsDataSource, type RecordsError, type RecordsErrorCode, type RecordsErrorSink, type RecordsFilter, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type RelationFlavor, type RelationProperties, type RelationTarget, type ResolutionTriple, type ResolvedPublishBinding, 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 UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, 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, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
|
|
6587
|
+
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 ChecklistDeclared, type ChecklistRequirement, type ChecklistRequirementKind, type ChecklistRoleSpec, type ChecklistRunStarted, type ChecklistRunStep, type ChecklistRunSummary, type ChecklistSpec, type ChecklistStepCompleted, type ChecklistStepSpec, type ChecklistTemplateShape, type ChecklistTemplateSummary, type ChecklistTrigger, type ChecklistTriggerKind, type ChoiceOption, type 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, RecordsProvider, type RecordsProviderProps, type RecordsRealtimePort, type RecordsResolverPort, type RecordsResponse, type RecordsResult, type RecordsTableQuery, type RegisteredTable, type Relation, type RelationBinding, type RelationCardinality, type RelationCarries, type RelationCoordinate, type 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 UseEntityFieldMutation, type UseFieldMutation, type UseRecordMutation, type UseRecordsOptions, type UseRecordsState, 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, useEntityFieldMutation, useEntityFieldRights, useEntityFields, useEntityRecord, useEntityTable, useFieldMutation, useFields, useMergeField, useMyLevel, useMyLevels, useOptionalRecordsClient, useRecord, useRecordMutation, useRecords, useRecordsActor, useRecordsClient, useTable, useTables };
|