@nivaro/sdk 0.1.4 → 0.1.5
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/dist/index.d.ts +1826 -64
- package/dist/index.js +557 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ interface Command<TResult> {
|
|
|
9
9
|
/**
|
|
10
10
|
* Administration commands: roles & policies (RBAC/RLS), user management +
|
|
11
11
|
* delegation, CSV import jobs, throughput reporting, notification-subscription
|
|
12
|
-
* admin views, extension/flow registries, mail test
|
|
12
|
+
* admin views, extension/flow registries, mail test, Report Studio, pipeline
|
|
13
|
+
* template versions, metric alerts, scope dimensions, staged imports, access
|
|
14
|
+
* audits, coverage gaps, integration health.
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
interface Role {
|
|
@@ -124,6 +126,10 @@ declare function setMyDelegate(data: {
|
|
|
124
126
|
delegate_id?: UUID | null;
|
|
125
127
|
delegate_expires_at?: ISODate | null;
|
|
126
128
|
is_out_of_office?: boolean;
|
|
129
|
+
/** Scheduled OOO window — the server's ooo-schedule cron flips the toggle
|
|
130
|
+
* on entry and clears it after the window passes. */
|
|
131
|
+
ooo_start?: ISODate | null;
|
|
132
|
+
ooo_end?: ISODate | null;
|
|
127
133
|
}): Command<{
|
|
128
134
|
data: ManagedUser;
|
|
129
135
|
}>;
|
|
@@ -670,8 +676,40 @@ interface ReportWidgetConfig {
|
|
|
670
676
|
}>;
|
|
671
677
|
/** type='query' widgets only. */
|
|
672
678
|
query?: ReportQueryWidgetConfig;
|
|
679
|
+
/** Dual-axis second metric on value-dimension charts. */
|
|
680
|
+
metric2?: {
|
|
681
|
+
aggregate: 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
682
|
+
field?: string;
|
|
683
|
+
label?: string;
|
|
684
|
+
};
|
|
685
|
+
/** type='calc' widgets: formula over sibling widgets' derived metrics. */
|
|
686
|
+
formula?: string;
|
|
687
|
+
refs?: Record<string, UUID>;
|
|
688
|
+
/** Table widgets: value rules → cell/row tints. */
|
|
689
|
+
format_rules?: Array<{
|
|
690
|
+
field: string;
|
|
691
|
+
op: 'gt' | 'gte' | 'lt' | 'lte' | 'eq';
|
|
692
|
+
value: number;
|
|
693
|
+
color: string;
|
|
694
|
+
scope?: 'cell' | 'row';
|
|
695
|
+
}>;
|
|
696
|
+
/** KPI mini trend line under the number (needs date_field). */
|
|
697
|
+
sparkline?: boolean;
|
|
698
|
+
/** Heatmap column dimension (rows come from `dimension`). */
|
|
699
|
+
dimension2?: {
|
|
700
|
+
field: string;
|
|
701
|
+
} | null;
|
|
702
|
+
/** Line charts: shaded min/max band from the prior 4 same-length windows. */
|
|
703
|
+
benchmark?: boolean;
|
|
704
|
+
/** Narrative widgets: markdown-lite text with {{token}} value refs. */
|
|
705
|
+
text?: string;
|
|
706
|
+
/** Drill-to-report: clicking navigates to another report, carrying the value. */
|
|
707
|
+
link_report?: {
|
|
708
|
+
report_id: string;
|
|
709
|
+
filter_field?: string;
|
|
710
|
+
} | null;
|
|
673
711
|
}
|
|
674
|
-
type ReportWidgetType = 'kpi' | 'kpi_group' | 'bar' | 'line' | 'donut' | 'table' | 'divider' | 'query';
|
|
712
|
+
type ReportWidgetType = 'kpi' | 'kpi_group' | 'bar' | 'line' | 'donut' | 'table' | 'divider' | 'query' | 'calc' | 'movers' | 'heatmap' | 'waterfall' | 'narrative';
|
|
675
713
|
interface ReportWidget {
|
|
676
714
|
id: UUID;
|
|
677
715
|
type: ReportWidgetType;
|
|
@@ -724,6 +762,8 @@ interface ReportDef {
|
|
|
724
762
|
widget_count?: number;
|
|
725
763
|
widgets?: ReportWidget[];
|
|
726
764
|
editable?: boolean;
|
|
765
|
+
folder?: string | null;
|
|
766
|
+
snapshot_schedule?: 'weekly' | 'monthly' | null;
|
|
727
767
|
updated_at: ISODate;
|
|
728
768
|
}
|
|
729
769
|
interface ReportWidgetData {
|
|
@@ -736,7 +776,30 @@ interface ReportWidgetData {
|
|
|
736
776
|
dim: string;
|
|
737
777
|
value: number;
|
|
738
778
|
prev?: number;
|
|
779
|
+
raw?: unknown;
|
|
780
|
+
value2?: number;
|
|
781
|
+
other?: boolean;
|
|
782
|
+
band?: [number, number];
|
|
783
|
+
band_avg?: number;
|
|
739
784
|
}>;
|
|
785
|
+
spark?: Array<{
|
|
786
|
+
dim: string;
|
|
787
|
+
value: number;
|
|
788
|
+
}>;
|
|
789
|
+
cells?: Array<{
|
|
790
|
+
dim: string;
|
|
791
|
+
dim2: string;
|
|
792
|
+
value: number;
|
|
793
|
+
}>;
|
|
794
|
+
waterfall?: {
|
|
795
|
+
start: number;
|
|
796
|
+
end: number;
|
|
797
|
+
steps: Array<{
|
|
798
|
+
dim: string;
|
|
799
|
+
delta: number;
|
|
800
|
+
}>;
|
|
801
|
+
};
|
|
802
|
+
narrative?: string;
|
|
740
803
|
tiles?: Array<{
|
|
741
804
|
label: string;
|
|
742
805
|
value: number | null;
|
|
@@ -938,25 +1001,804 @@ declare function resolveReportAlert(id: UUID, alertId: UUID): Command<{
|
|
|
938
1001
|
resolved: number;
|
|
939
1002
|
};
|
|
940
1003
|
}>;
|
|
941
|
-
interface ReportAlertLogEntry {
|
|
1004
|
+
interface ReportAlertLogEntry {
|
|
1005
|
+
id: number;
|
|
1006
|
+
alert: UUID;
|
|
1007
|
+
status: 'firing' | 'resolved';
|
|
1008
|
+
metric_snapshot: Record<string, number> | null;
|
|
1009
|
+
fired_at: ISODate;
|
|
1010
|
+
resolved_at: ISODate | null;
|
|
1011
|
+
}
|
|
1012
|
+
declare function readReportAlertLog(id: UUID, alertId: UUID): Command<{
|
|
1013
|
+
data: ReportAlertLogEntry[];
|
|
1014
|
+
}>;
|
|
1015
|
+
declare function toggleReportAlert(id: UUID, alertId: UUID, isActive: boolean): Command<{
|
|
1016
|
+
data: {
|
|
1017
|
+
updated: boolean;
|
|
1018
|
+
};
|
|
1019
|
+
}>;
|
|
1020
|
+
declare function deleteReportAlert(id: UUID, alertId: UUID): Command<{
|
|
1021
|
+
data: {
|
|
1022
|
+
deleted: boolean;
|
|
1023
|
+
};
|
|
1024
|
+
}>;
|
|
1025
|
+
/** Every alert's firing history for a report (newest first, capped 100). */
|
|
1026
|
+
declare function readReportAlertsLog(id: UUID): Command<{
|
|
1027
|
+
data: ReportAlertLogEntry[];
|
|
1028
|
+
}>;
|
|
1029
|
+
/** Currently-firing alerts for a report — drives the report's red strip. */
|
|
1030
|
+
declare function readReportFiring(id: UUID): Command<{
|
|
1031
|
+
data: Array<{
|
|
1032
|
+
alert_id: UUID;
|
|
1033
|
+
name: string;
|
|
1034
|
+
widget: UUID;
|
|
1035
|
+
since: ISODate;
|
|
1036
|
+
}>;
|
|
1037
|
+
}>;
|
|
1038
|
+
interface ReportVersionEntry {
|
|
1039
|
+
id: number;
|
|
1040
|
+
version: number;
|
|
1041
|
+
note: string | null;
|
|
1042
|
+
created_at: ISODate;
|
|
1043
|
+
created_by_name: string | null;
|
|
1044
|
+
}
|
|
1045
|
+
/** Config version history for a report (newest first, capped 30). */
|
|
1046
|
+
declare function listReportVersions(id: UUID): Command<{
|
|
1047
|
+
data: ReportVersionEntry[];
|
|
1048
|
+
}>;
|
|
1049
|
+
/** Restore a config version. Id-preserving; captures a 'before restore' version first. */
|
|
1050
|
+
declare function restoreReportVersion(id: UUID, versionId: number): Command<{
|
|
1051
|
+
data: Record<string, unknown>;
|
|
1052
|
+
}>;
|
|
1053
|
+
interface ReportSnapshotEntry {
|
|
1054
|
+
id: number;
|
|
1055
|
+
name: string;
|
|
1056
|
+
taken_at: ISODate;
|
|
1057
|
+
}
|
|
1058
|
+
/** Point-in-time snapshots (one derived metric per widget) for vs-then deltas. */
|
|
1059
|
+
declare function listReportSnapshots(id: UUID): Command<{
|
|
1060
|
+
data: ReportSnapshotEntry[];
|
|
1061
|
+
}>;
|
|
1062
|
+
/** Take a snapshot now, resolved as the caller with the report's own date range. */
|
|
1063
|
+
declare function createReportSnapshot(id: UUID, name?: string): Command<{
|
|
1064
|
+
data: {
|
|
1065
|
+
id: number;
|
|
1066
|
+
name: string;
|
|
1067
|
+
};
|
|
1068
|
+
}>;
|
|
1069
|
+
/** One snapshot with its per-widget values ({ widgetId: { value } }). */
|
|
1070
|
+
declare function readReportSnapshot(id: UUID, snapId: number): Command<{
|
|
1071
|
+
data: ReportSnapshotEntry & {
|
|
1072
|
+
data: Record<string, {
|
|
1073
|
+
value: number | null;
|
|
1074
|
+
}>;
|
|
1075
|
+
};
|
|
1076
|
+
}>;
|
|
1077
|
+
declare function deleteReportSnapshot(id: UUID, snapId: number): Command<{
|
|
1078
|
+
data: {
|
|
1079
|
+
deleted: boolean;
|
|
1080
|
+
};
|
|
1081
|
+
}>;
|
|
1082
|
+
interface ReportAnnotation {
|
|
1083
|
+
id: number;
|
|
1084
|
+
widget: UUID;
|
|
1085
|
+
note: string;
|
|
1086
|
+
/** 'YYYY-MM' or 'YYYY-MM-DD' bucket key — renders as a chart marker when it
|
|
1087
|
+
* matches a bucket. */
|
|
1088
|
+
anchor_date: string | null;
|
|
1089
|
+
created_at: ISODate;
|
|
1090
|
+
created_by: UUID;
|
|
1091
|
+
created_by_name: string | null;
|
|
1092
|
+
}
|
|
1093
|
+
declare function listReportAnnotations(id: UUID): Command<{
|
|
1094
|
+
data: ReportAnnotation[];
|
|
1095
|
+
}>;
|
|
1096
|
+
declare function createReportAnnotation(id: UUID, body: {
|
|
1097
|
+
widget: UUID;
|
|
1098
|
+
note: string;
|
|
1099
|
+
anchor_date?: string | null;
|
|
1100
|
+
}): Command<{
|
|
1101
|
+
data: {
|
|
1102
|
+
id: number;
|
|
1103
|
+
};
|
|
1104
|
+
}>;
|
|
1105
|
+
/** Delete an annotation (own note, or anyone with edit access to the report). */
|
|
1106
|
+
declare function deleteReportAnnotation(id: UUID, annId: number): Command<{
|
|
1107
|
+
data: {
|
|
1108
|
+
deleted: boolean;
|
|
1109
|
+
};
|
|
1110
|
+
}>;
|
|
1111
|
+
interface ReportTemplateEntry {
|
|
1112
|
+
id: number;
|
|
1113
|
+
name: string;
|
|
1114
|
+
description: string | null;
|
|
1115
|
+
created_at: ISODate;
|
|
1116
|
+
}
|
|
1117
|
+
/** Whole-report templates (global filters + widget set snapshots). */
|
|
1118
|
+
declare function listReportTemplates(): Command<{
|
|
1119
|
+
data: ReportTemplateEntry[];
|
|
1120
|
+
}>;
|
|
1121
|
+
/** Snapshot a report's current config as a reusable template. */
|
|
1122
|
+
declare function saveReportTemplate(id: UUID, body?: {
|
|
1123
|
+
name?: string;
|
|
1124
|
+
description?: string;
|
|
1125
|
+
}): Command<{
|
|
1126
|
+
data: {
|
|
1127
|
+
id: number;
|
|
1128
|
+
name: string;
|
|
1129
|
+
};
|
|
1130
|
+
}>;
|
|
1131
|
+
/** Instantiate a new (private) report from a template. */
|
|
1132
|
+
declare function createReportFromTemplate(body: {
|
|
1133
|
+
template_id: number;
|
|
1134
|
+
name?: string;
|
|
1135
|
+
}): Command<{
|
|
1136
|
+
data: {
|
|
1137
|
+
id: UUID;
|
|
1138
|
+
};
|
|
1139
|
+
}>;
|
|
1140
|
+
/** Delete a template (creator or admin). */
|
|
1141
|
+
declare function deleteReportTemplate(templateId: number): Command<{
|
|
1142
|
+
data: {
|
|
1143
|
+
deleted: boolean;
|
|
1144
|
+
};
|
|
1145
|
+
}>;
|
|
1146
|
+
/** Copy a widget into another report (needs edit access to the target). */
|
|
1147
|
+
declare function copyReportWidget(id: UUID, widgetId: UUID, targetReportId: UUID): Command<{
|
|
1148
|
+
data: {
|
|
1149
|
+
id: UUID;
|
|
1150
|
+
report: UUID;
|
|
1151
|
+
};
|
|
1152
|
+
}>;
|
|
1153
|
+
/** Infer the record behind a query-widget row from its column values.
|
|
1154
|
+
* Resolved as the caller (RBAC/RLS apply); ambiguity is a miss. */
|
|
1155
|
+
declare function drillReportRow(values: Record<string, unknown>): Command<{
|
|
1156
|
+
data: {
|
|
1157
|
+
collection: string;
|
|
1158
|
+
item_id: string;
|
|
1159
|
+
} | {
|
|
1160
|
+
resolved: false;
|
|
1161
|
+
};
|
|
1162
|
+
}>;
|
|
1163
|
+
/** Per-report read stats from the throttled report-view activity log. Admin only. */
|
|
1164
|
+
declare function readReportUsage(): Command<{
|
|
1165
|
+
data: Record<string, {
|
|
1166
|
+
last_viewed: ISODate;
|
|
1167
|
+
views_30d: number;
|
|
1168
|
+
viewers_30d: number;
|
|
1169
|
+
}>;
|
|
1170
|
+
}>;
|
|
1171
|
+
interface ReportWidgetPreset {
|
|
1172
|
+
id: number;
|
|
1173
|
+
name: string;
|
|
1174
|
+
category: string;
|
|
1175
|
+
description: string | null;
|
|
1176
|
+
widget_type: ReportWidgetType;
|
|
1177
|
+
config: ReportWidgetConfig | null;
|
|
1178
|
+
w: number;
|
|
1179
|
+
h: number;
|
|
1180
|
+
}
|
|
1181
|
+
/** Active prebuilt widget presets, ordered by category/sort/name. */
|
|
1182
|
+
declare function listReportWidgetPresets(): Command<{
|
|
1183
|
+
data: ReportWidgetPreset[];
|
|
1184
|
+
}>;
|
|
1185
|
+
/** Add a preset to the catalog. Admin only. */
|
|
1186
|
+
declare function createReportWidgetPreset(body: {
|
|
1187
|
+
name: string;
|
|
1188
|
+
widget_type: ReportWidgetType;
|
|
1189
|
+
category?: string;
|
|
1190
|
+
description?: string | null;
|
|
1191
|
+
config?: ReportWidgetConfig | null;
|
|
1192
|
+
w?: number;
|
|
1193
|
+
h?: number;
|
|
1194
|
+
sort?: number;
|
|
1195
|
+
is_active?: boolean;
|
|
1196
|
+
}): Command<{
|
|
1197
|
+
data: {
|
|
1198
|
+
ok: boolean;
|
|
1199
|
+
};
|
|
1200
|
+
}>;
|
|
1201
|
+
/** Update a preset. Admin only. */
|
|
1202
|
+
declare function updateReportWidgetPreset(presetId: number, body: Partial<Omit<ReportWidgetPreset, 'id'>> & {
|
|
1203
|
+
sort?: number;
|
|
1204
|
+
is_active?: boolean;
|
|
1205
|
+
}): Command<{
|
|
1206
|
+
data: {
|
|
1207
|
+
ok: boolean;
|
|
1208
|
+
};
|
|
1209
|
+
}>;
|
|
1210
|
+
/** Delete a preset. Admin only. */
|
|
1211
|
+
declare function deleteReportWidgetPreset(presetId: number): Command<{
|
|
1212
|
+
data: {
|
|
1213
|
+
ok: boolean;
|
|
1214
|
+
};
|
|
1215
|
+
}>;
|
|
1216
|
+
interface PipelineVersionEntry {
|
|
1217
|
+
id: number;
|
|
1218
|
+
version: number;
|
|
1219
|
+
note: string | null;
|
|
1220
|
+
created_at: ISODate;
|
|
1221
|
+
created_by_name: string | null;
|
|
1222
|
+
}
|
|
1223
|
+
/** Config snapshots for a workflow/pipeline template (newest first). Admin only. */
|
|
1224
|
+
declare function listPipelineVersions(templateId: string): Command<{
|
|
1225
|
+
data: PipelineVersionEntry[];
|
|
1226
|
+
}>;
|
|
1227
|
+
/** One version with its parsed snapshot ({ template, states, transitions, bindings }). */
|
|
1228
|
+
declare function readPipelineVersion(templateId: string, versionId: number): Command<{
|
|
1229
|
+
data: PipelineVersionEntry & {
|
|
1230
|
+
snapshot: Record<string, unknown>;
|
|
1231
|
+
};
|
|
1232
|
+
}>;
|
|
1233
|
+
/** Restore a template config version. Id-preserving — states/bindings are never
|
|
1234
|
+
* deleted; a 'before restore' version is captured first. Admin only. */
|
|
1235
|
+
declare function restorePipelineVersion(templateId: string, versionId: number): Command<{
|
|
1236
|
+
data: Record<string, unknown>;
|
|
1237
|
+
}>;
|
|
1238
|
+
interface PipelineImpactResult {
|
|
1239
|
+
state: {
|
|
1240
|
+
id: string;
|
|
1241
|
+
label: string | null;
|
|
1242
|
+
};
|
|
1243
|
+
evaluated: number;
|
|
1244
|
+
truncated: boolean;
|
|
1245
|
+
now_skipped: number;
|
|
1246
|
+
now_required: number;
|
|
1247
|
+
changes: Array<{
|
|
1248
|
+
collection: string;
|
|
1249
|
+
item: string;
|
|
1250
|
+
current: boolean;
|
|
1251
|
+
proposed: boolean;
|
|
1252
|
+
proposed_reasons: string[];
|
|
1253
|
+
}>;
|
|
1254
|
+
}
|
|
1255
|
+
/** Preview a proposed skip-criteria change against real records in active
|
|
1256
|
+
* instances — returns only records whose skip decision flips. Admin only. */
|
|
1257
|
+
declare function simulatePipelineImpact(templateId: string, body: {
|
|
1258
|
+
state_id: string;
|
|
1259
|
+
skip_criteria?: Record<string, unknown> | null;
|
|
1260
|
+
skip_if_no_owners?: boolean;
|
|
1261
|
+
limit?: number;
|
|
1262
|
+
}): Command<{
|
|
1263
|
+
data: PipelineImpactResult;
|
|
1264
|
+
}>;
|
|
1265
|
+
interface ApprovalBrief {
|
|
1266
|
+
entered_at: ISODate;
|
|
1267
|
+
days_in_state: number;
|
|
1268
|
+
revisions: number;
|
|
1269
|
+
field_changes: Array<{
|
|
1270
|
+
field: string;
|
|
1271
|
+
old?: unknown;
|
|
1272
|
+
new: unknown;
|
|
1273
|
+
}>;
|
|
1274
|
+
changed_total: number;
|
|
1275
|
+
comments: number;
|
|
1276
|
+
addendums: {
|
|
1277
|
+
count: number;
|
|
1278
|
+
cost_impact: number;
|
|
1279
|
+
};
|
|
1280
|
+
edited_by: string[];
|
|
1281
|
+
}
|
|
1282
|
+
/** What changed on a record since it entered its current state — the window an
|
|
1283
|
+
* approver is signing off on. Null when the record has no workflow instance. */
|
|
1284
|
+
declare function readApprovalBrief(collection: string, item: string | number): Command<{
|
|
1285
|
+
data: ApprovalBrief | null;
|
|
1286
|
+
}>;
|
|
1287
|
+
/** Resolved owner display names per record id (one batched engine pass — feeds
|
|
1288
|
+
* browser Owners columns). Max 500 ids. */
|
|
1289
|
+
declare function readStateOwnersBatch(collection: string, ids: Array<string | number>): Command<{
|
|
1290
|
+
data: Record<string, Array<{
|
|
1291
|
+
id: string;
|
|
1292
|
+
name: string;
|
|
1293
|
+
}>>;
|
|
1294
|
+
}>;
|
|
1295
|
+
interface MetricDefinition {
|
|
1296
|
+
id: number;
|
|
1297
|
+
name: string;
|
|
1298
|
+
description: string | null;
|
|
1299
|
+
metric_key: string;
|
|
1300
|
+
category: string;
|
|
1301
|
+
unit: string;
|
|
1302
|
+
default_operator: string;
|
|
1303
|
+
default_threshold: number | null;
|
|
1304
|
+
/** Admin callers only — omitted for everyone else. */
|
|
1305
|
+
metric_source?: Record<string, unknown>;
|
|
1306
|
+
supported_filters: unknown;
|
|
1307
|
+
status: string;
|
|
1308
|
+
sort: number | null;
|
|
1309
|
+
}
|
|
1310
|
+
interface MetricAlertRule {
|
|
1311
|
+
id: number;
|
|
1312
|
+
name: string;
|
|
1313
|
+
definition_id: number;
|
|
1314
|
+
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'change_pct';
|
|
1315
|
+
threshold_value: number;
|
|
1316
|
+
filters: unknown;
|
|
1317
|
+
check_frequency: 'hourly' | 'daily' | 'weekly';
|
|
1318
|
+
is_shared: boolean;
|
|
1319
|
+
status: 'active' | 'paused' | 'archived';
|
|
1320
|
+
created_by: UUID;
|
|
1321
|
+
/** Joined definition summary on list reads. */
|
|
1322
|
+
definition?: {
|
|
1323
|
+
id: number;
|
|
1324
|
+
name: string;
|
|
1325
|
+
description: string | null;
|
|
1326
|
+
category: string;
|
|
1327
|
+
unit: string;
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
interface MetricAlertSubscription {
|
|
1331
|
+
id: number;
|
|
1332
|
+
rule_id: number;
|
|
1333
|
+
user: UUID;
|
|
1334
|
+
delivery_in_app: boolean;
|
|
1335
|
+
delivery_email: boolean;
|
|
1336
|
+
digest_frequency: 'immediate' | 'daily' | 'weekly';
|
|
1337
|
+
status: string;
|
|
1338
|
+
rule_name?: string;
|
|
1339
|
+
definition_name?: string;
|
|
1340
|
+
}
|
|
1341
|
+
/** The metric catalog (active only unless an admin passes all). */
|
|
1342
|
+
declare function listMetricDefinitions(options?: {
|
|
1343
|
+
all?: boolean;
|
|
1344
|
+
}): Command<{
|
|
1345
|
+
data: MetricDefinition[];
|
|
1346
|
+
}>;
|
|
1347
|
+
/** Rules visible to the caller (shared or own). */
|
|
1348
|
+
declare function listMetricAlertRules(): Command<{
|
|
1349
|
+
data: MetricAlertRule[];
|
|
1350
|
+
}>;
|
|
1351
|
+
/** Create a rule (the creator is auto-subscribed, EFP behavior). */
|
|
1352
|
+
declare function createMetricAlertRule(body: {
|
|
1353
|
+
name: string;
|
|
1354
|
+
definition_id: number;
|
|
1355
|
+
threshold_value: number;
|
|
1356
|
+
operator?: MetricAlertRule['operator'];
|
|
1357
|
+
filters?: unknown;
|
|
1358
|
+
check_frequency?: MetricAlertRule['check_frequency'];
|
|
1359
|
+
is_shared?: boolean;
|
|
1360
|
+
status?: MetricAlertRule['status'];
|
|
1361
|
+
}): Command<{
|
|
1362
|
+
data: MetricAlertRule;
|
|
1363
|
+
}>;
|
|
1364
|
+
/** Update an own rule (admins may edit any). */
|
|
1365
|
+
declare function updateMetricAlertRule(id: number, body: Partial<Omit<MetricAlertRule, 'id' | 'created_by' | 'definition'>>): Command<{
|
|
1366
|
+
data: MetricAlertRule;
|
|
1367
|
+
}>;
|
|
1368
|
+
/** Delete an own rule. Note: responds { ok: true }, not a data envelope. */
|
|
1369
|
+
declare function deleteMetricAlertRule(id: number): Command<{
|
|
1370
|
+
ok: boolean;
|
|
1371
|
+
}>;
|
|
1372
|
+
/** The caller's own subscriptions (with joined rule/definition summaries). */
|
|
1373
|
+
declare function listMetricAlertSubscriptions(): Command<{
|
|
1374
|
+
data: MetricAlertSubscription[];
|
|
1375
|
+
}>;
|
|
1376
|
+
/** Subscribe to a shared (or own) rule — idempotent, returns the existing row. */
|
|
1377
|
+
declare function subscribeMetricAlert(body: {
|
|
1378
|
+
rule_id: number;
|
|
1379
|
+
delivery_in_app?: boolean;
|
|
1380
|
+
delivery_email?: boolean;
|
|
1381
|
+
digest_frequency?: MetricAlertSubscription['digest_frequency'];
|
|
1382
|
+
}): Command<{
|
|
1383
|
+
data: MetricAlertSubscription;
|
|
1384
|
+
}>;
|
|
1385
|
+
declare function updateMetricAlertSubscription(id: number, body: {
|
|
1386
|
+
delivery_in_app?: boolean;
|
|
1387
|
+
delivery_email?: boolean;
|
|
1388
|
+
digest_frequency?: MetricAlertSubscription['digest_frequency'];
|
|
1389
|
+
status?: 'active' | 'paused';
|
|
1390
|
+
}): Command<{
|
|
1391
|
+
data: MetricAlertSubscription;
|
|
1392
|
+
}>;
|
|
1393
|
+
/** Unsubscribe. Note: responds { ok: true }, not a data envelope. */
|
|
1394
|
+
declare function unsubscribeMetricAlert(id: number): Command<{
|
|
1395
|
+
ok: boolean;
|
|
1396
|
+
}>;
|
|
1397
|
+
/** Firing log for rules the caller can see (newest first, cap 500). */
|
|
1398
|
+
declare function readMetricAlertLog(options?: {
|
|
1399
|
+
limit?: number;
|
|
1400
|
+
}): Command<{
|
|
1401
|
+
data: Array<Record<string, unknown>>;
|
|
1402
|
+
}>;
|
|
1403
|
+
interface AnomalyDefinition {
|
|
1404
|
+
id: number;
|
|
1405
|
+
key: string;
|
|
1406
|
+
name: string;
|
|
1407
|
+
description: string | null;
|
|
1408
|
+
category: string;
|
|
1409
|
+
/** Admin callers only. */
|
|
1410
|
+
config?: Record<string, unknown>;
|
|
1411
|
+
/** Public scope picker spec: [{key, label, collection?, value_field?, label_field?, sort?}] */
|
|
1412
|
+
scope_options: unknown;
|
|
1413
|
+
sensitivity_hints: unknown;
|
|
1414
|
+
status: string;
|
|
1415
|
+
}
|
|
1416
|
+
interface AnomalyRule {
|
|
1417
|
+
id: number;
|
|
1418
|
+
name: string;
|
|
1419
|
+
definition_id: number;
|
|
1420
|
+
sensitivity: 'low' | 'medium' | 'high';
|
|
1421
|
+
scopes: unknown;
|
|
1422
|
+
check_frequency: 'daily' | 'weekly';
|
|
1423
|
+
delivery_in_app: boolean;
|
|
1424
|
+
delivery_email: boolean;
|
|
1425
|
+
status: 'active' | 'paused';
|
|
1426
|
+
created_by: UUID;
|
|
1427
|
+
definition?: {
|
|
1428
|
+
id: number;
|
|
1429
|
+
key: string;
|
|
1430
|
+
name: string;
|
|
1431
|
+
description: string | null;
|
|
1432
|
+
};
|
|
1433
|
+
}
|
|
1434
|
+
/** The anomaly detector catalog (active only unless an admin passes all). */
|
|
1435
|
+
declare function listAnomalyDefinitions(options?: {
|
|
1436
|
+
all?: boolean;
|
|
1437
|
+
}): Command<{
|
|
1438
|
+
data: AnomalyDefinition[];
|
|
1439
|
+
}>;
|
|
1440
|
+
declare function listAnomalyRules(): Command<{
|
|
1441
|
+
data: AnomalyRule[];
|
|
1442
|
+
}>;
|
|
1443
|
+
declare function createAnomalyRule(body: {
|
|
1444
|
+
name: string;
|
|
1445
|
+
definition_id: number;
|
|
1446
|
+
sensitivity?: AnomalyRule['sensitivity'];
|
|
1447
|
+
scopes?: unknown;
|
|
1448
|
+
check_frequency?: AnomalyRule['check_frequency'];
|
|
1449
|
+
delivery_in_app?: boolean;
|
|
1450
|
+
delivery_email?: boolean;
|
|
1451
|
+
status?: AnomalyRule['status'];
|
|
1452
|
+
}): Command<{
|
|
1453
|
+
data: AnomalyRule;
|
|
1454
|
+
}>;
|
|
1455
|
+
/** Update an own anomaly rule (admins may edit any). */
|
|
1456
|
+
declare function updateAnomalyRule(id: number, body: Partial<Omit<AnomalyRule, 'id' | 'created_by' | 'definition'>>): Command<{
|
|
1457
|
+
data: AnomalyRule;
|
|
1458
|
+
}>;
|
|
1459
|
+
/** Delete an own anomaly rule. Note: responds { ok: true }, not a data envelope. */
|
|
1460
|
+
declare function deleteAnomalyRule(id: number): Command<{
|
|
1461
|
+
ok: boolean;
|
|
1462
|
+
}>;
|
|
1463
|
+
/** Detection log (newest first, cap 500); stats_snapshot comes back parsed. */
|
|
1464
|
+
declare function readAnomalyLog(options?: {
|
|
1465
|
+
limit?: number;
|
|
1466
|
+
}): Command<{
|
|
1467
|
+
data: Array<Record<string, unknown>>;
|
|
1468
|
+
}>;
|
|
1469
|
+
/** Acknowledge or resolve a detection. */
|
|
1470
|
+
declare function updateAnomalyLogEntry(id: number, status: 'acknowledged' | 'resolved'): Command<{
|
|
1471
|
+
data: Record<string, unknown>;
|
|
1472
|
+
}>;
|
|
1473
|
+
interface ScopeDimension {
|
|
1474
|
+
id: number;
|
|
1475
|
+
name: string;
|
|
1476
|
+
label: string;
|
|
1477
|
+
target_collection: string;
|
|
1478
|
+
display_field: string | null;
|
|
1479
|
+
options_sort: string | null;
|
|
1480
|
+
overrides: Record<string, string[]> | null;
|
|
1481
|
+
exclusions: string[] | null;
|
|
1482
|
+
strict: boolean;
|
|
1483
|
+
is_active: boolean;
|
|
1484
|
+
}
|
|
1485
|
+
/** The full dimension registry (authenticated; includes inactive rows). */
|
|
1486
|
+
declare function listScopeDimensions(): Command<{
|
|
1487
|
+
data: ScopeDimension[];
|
|
1488
|
+
}>;
|
|
1489
|
+
/** Live coverage preview: how the dimension resolves on every business
|
|
1490
|
+
* collection (self / auto / override / excluded / unreachable). Admin only. */
|
|
1491
|
+
declare function readScopeDimensionCoverage(id: number): Command<{
|
|
1492
|
+
data: Array<{
|
|
1493
|
+
collection: string;
|
|
1494
|
+
status: 'self' | 'auto' | 'override' | 'excluded' | 'unreachable';
|
|
1495
|
+
route: string | null;
|
|
1496
|
+
hops: unknown;
|
|
1497
|
+
}>;
|
|
1498
|
+
}>;
|
|
1499
|
+
interface StagedImportRun {
|
|
1500
|
+
id: number;
|
|
1501
|
+
definition: number | null;
|
|
1502
|
+
import_key: string;
|
|
1503
|
+
status: 'queued' | 'running' | 'completed' | 'error' | 'canceled';
|
|
1504
|
+
sort: number;
|
|
1505
|
+
file: UUID | null;
|
|
1506
|
+
row_count: number | null;
|
|
1507
|
+
duration: number | null;
|
|
1508
|
+
logs: string | null;
|
|
1509
|
+
started_at: ISODate | null;
|
|
1510
|
+
finished_at: ISODate | null;
|
|
1511
|
+
created_by: UUID | null;
|
|
1512
|
+
created_at: ISODate;
|
|
1513
|
+
updated_at: ISODate | null;
|
|
1514
|
+
legacy_id: number | null;
|
|
1515
|
+
definition_label: string | null;
|
|
1516
|
+
staging_table: string | null;
|
|
1517
|
+
procedure: string | null;
|
|
1518
|
+
loader: string | null;
|
|
1519
|
+
definition_active: boolean | null;
|
|
1520
|
+
file_name: string | null;
|
|
1521
|
+
file_size: number | null;
|
|
1522
|
+
created_by_first_name: string | null;
|
|
1523
|
+
created_by_last_name: string | null;
|
|
1524
|
+
created_by_email: string | null;
|
|
1525
|
+
}
|
|
1526
|
+
interface StagedImportStats {
|
|
1527
|
+
window_days: number;
|
|
1528
|
+
by_status: Record<string, number>;
|
|
1529
|
+
total: number;
|
|
1530
|
+
all_time_total: number;
|
|
1531
|
+
by_key: Record<string, number>;
|
|
1532
|
+
rows_imported: number;
|
|
1533
|
+
median_duration: number | null;
|
|
1534
|
+
success_rate: number | null;
|
|
1535
|
+
runs_today: number;
|
|
1536
|
+
active: Array<{
|
|
1537
|
+
id: number;
|
|
1538
|
+
import_key: string;
|
|
1539
|
+
status: string;
|
|
1540
|
+
started_at: ISODate | null;
|
|
1541
|
+
created_at: ISODate;
|
|
1542
|
+
row_count: number | null;
|
|
1543
|
+
}>;
|
|
1544
|
+
}
|
|
1545
|
+
interface ImportDefinition {
|
|
1546
|
+
id: number;
|
|
1547
|
+
key: string;
|
|
1548
|
+
label: string | null;
|
|
1549
|
+
description: string | null;
|
|
1550
|
+
staging_table: string | null;
|
|
1551
|
+
procedure: string | null;
|
|
1552
|
+
loader: 'bulk' | 'insert' | null;
|
|
1553
|
+
sort: number;
|
|
1554
|
+
is_active: boolean;
|
|
1555
|
+
staging_columns?: unknown;
|
|
1556
|
+
validation?: unknown;
|
|
1557
|
+
procedure_body?: string | null;
|
|
1558
|
+
}
|
|
1559
|
+
/** Paged staged-import runs. `days=0`/absent means all time; `status` accepts a
|
|
1560
|
+
* comma list; `search` matches key / definition label / file name / run id. */
|
|
1561
|
+
declare function listStagedImports(options?: {
|
|
1562
|
+
search?: string;
|
|
1563
|
+
page?: number;
|
|
1564
|
+
days?: number;
|
|
1565
|
+
status?: string;
|
|
1566
|
+
key?: string;
|
|
1567
|
+
limit?: number;
|
|
1568
|
+
}): Command<{
|
|
1569
|
+
data: StagedImportRun[];
|
|
1570
|
+
total: number;
|
|
1571
|
+
page: number;
|
|
1572
|
+
limit: number;
|
|
1573
|
+
}>;
|
|
1574
|
+
/** Windowed aggregate stats (counts, success rate, live queue). `days=0` = all time. */
|
|
1575
|
+
declare function readStagedImportStats(days?: number): Command<{
|
|
1576
|
+
data: StagedImportStats;
|
|
1577
|
+
}>;
|
|
1578
|
+
declare function readStagedImport(id: number): Command<{
|
|
1579
|
+
data: StagedImportRun;
|
|
1580
|
+
}>;
|
|
1581
|
+
/** Re-queue a finished or failed run without re-uploading its file. Admin only. */
|
|
1582
|
+
declare function requeueStagedImport(id: number): Command<{
|
|
1583
|
+
data: {
|
|
1584
|
+
id: number;
|
|
1585
|
+
status: string;
|
|
1586
|
+
};
|
|
1587
|
+
}>;
|
|
1588
|
+
/** Stop a run that hasn't started, or clear one wedged in `running`. Admin only. */
|
|
1589
|
+
declare function cancelStagedImport(id: number): Command<{
|
|
1590
|
+
data: {
|
|
1591
|
+
id: number;
|
|
1592
|
+
status: string;
|
|
1593
|
+
};
|
|
1594
|
+
}>;
|
|
1595
|
+
/** Import definitions (active only unless `all`). */
|
|
1596
|
+
declare function listImportDefinitions(options?: {
|
|
1597
|
+
all?: boolean;
|
|
1598
|
+
}): Command<{
|
|
1599
|
+
data: ImportDefinition[];
|
|
1600
|
+
}>;
|
|
1601
|
+
/** Register a new import definition. Admin only. */
|
|
1602
|
+
declare function createImportDefinition(data: {
|
|
1603
|
+
key: string;
|
|
1604
|
+
label?: string;
|
|
1605
|
+
description?: string;
|
|
1606
|
+
staging_table?: string;
|
|
1607
|
+
procedure?: string;
|
|
1608
|
+
loader?: 'bulk' | 'insert';
|
|
1609
|
+
sort?: number;
|
|
1610
|
+
}): Command<{
|
|
1611
|
+
data: ImportDefinition;
|
|
1612
|
+
}>;
|
|
1613
|
+
/** Update a definition (config fields accept objects or JSON strings). Admin only. */
|
|
1614
|
+
declare function updateImportDefinition(id: number, data: Partial<Omit<ImportDefinition, 'id' | 'key'>>): Command<{
|
|
1615
|
+
data: ImportDefinition;
|
|
1616
|
+
}>;
|
|
1617
|
+
/** The LIVE procedure body from SQL Server vs the stored one (+ hashes). Admin only. */
|
|
1618
|
+
declare function readImportProcedure(id: number): Command<{
|
|
1619
|
+
data: {
|
|
1620
|
+
procedure: string;
|
|
1621
|
+
live_body: string | null;
|
|
1622
|
+
stored_body: string | null;
|
|
1623
|
+
deployed_hash: string | null;
|
|
1624
|
+
stored_hash: string | null;
|
|
1625
|
+
};
|
|
1626
|
+
}>;
|
|
1627
|
+
/** Deploy the stored procedure body via CREATE OR ALTER (scoped to the
|
|
1628
|
+
* definition's own procedure name). Admin only. */
|
|
1629
|
+
declare function deployImportProcedure(id: number): Command<{
|
|
1630
|
+
data: {
|
|
1631
|
+
deployed: boolean;
|
|
1632
|
+
hash: string;
|
|
1633
|
+
};
|
|
1634
|
+
}>;
|
|
1635
|
+
/** Definition version history (proc body + schema + validation together). Admin only. */
|
|
1636
|
+
declare function listImportDefinitionVersions(id: number): Command<{
|
|
1637
|
+
data: Array<{
|
|
1638
|
+
id: number;
|
|
1639
|
+
version: number;
|
|
1640
|
+
note: string | null;
|
|
1641
|
+
created_by: UUID | null;
|
|
1642
|
+
created_at: ISODate;
|
|
1643
|
+
}>;
|
|
1644
|
+
}>;
|
|
1645
|
+
/** Restore a definition version (captures a 'before restore' version first). Admin only. */
|
|
1646
|
+
declare function restoreImportDefinitionVersion(id: number, versionId: number): Command<{
|
|
1647
|
+
data: ImportDefinition;
|
|
1648
|
+
}>;
|
|
1649
|
+
/** Regex-mine the live procedure for join/merge patterns and prefill a
|
|
1650
|
+
* validation config for review — nothing is saved. Admin only. */
|
|
1651
|
+
declare function suggestImportValidation(id: number): Command<{
|
|
1652
|
+
data: {
|
|
1653
|
+
suggestion: {
|
|
1654
|
+
key_columns: string[];
|
|
1655
|
+
target_table?: string;
|
|
1656
|
+
lookups: Array<{
|
|
1657
|
+
column: string;
|
|
1658
|
+
collection: string;
|
|
1659
|
+
match_field: string;
|
|
1660
|
+
}>;
|
|
1661
|
+
};
|
|
1662
|
+
procedure: string;
|
|
1663
|
+
note: string;
|
|
1664
|
+
};
|
|
1665
|
+
}>;
|
|
1666
|
+
interface AccessAuditSubject {
|
|
1667
|
+
type: 'field' | 'pipeline_owners';
|
|
1668
|
+
field?: string;
|
|
1669
|
+
label: string;
|
|
1670
|
+
}
|
|
1671
|
+
interface AccessAuditRun {
|
|
1672
|
+
id: number;
|
|
1673
|
+
audit: number;
|
|
1674
|
+
status: 'running' | 'completed' | 'error';
|
|
1675
|
+
checked_records?: number;
|
|
1676
|
+
checked_pairs?: number;
|
|
1677
|
+
violation_count?: number;
|
|
1678
|
+
truncated?: boolean;
|
|
1679
|
+
error?: string | null;
|
|
1680
|
+
triggered_by: UUID | null;
|
|
1681
|
+
started_at: ISODate;
|
|
1682
|
+
finished_at?: ISODate | null;
|
|
1683
|
+
}
|
|
1684
|
+
interface AccessAudit {
|
|
1685
|
+
id: number;
|
|
1686
|
+
name: string;
|
|
1687
|
+
collection: string;
|
|
1688
|
+
subjects: AccessAuditSubject[];
|
|
1689
|
+
is_active: boolean;
|
|
1690
|
+
sort: number;
|
|
1691
|
+
latest_run?: AccessAuditRun | null;
|
|
1692
|
+
}
|
|
1693
|
+
interface AccessAuditFinding {
|
|
1694
|
+
id: number;
|
|
1695
|
+
collection: string;
|
|
1696
|
+
item_id: string;
|
|
1697
|
+
item_label: string | null;
|
|
1698
|
+
user: UUID;
|
|
1699
|
+
subject: string;
|
|
1700
|
+
reasons: string[];
|
|
1701
|
+
user_email: string | null;
|
|
1702
|
+
first_name: string | null;
|
|
1703
|
+
last_name: string | null;
|
|
1704
|
+
last_access: ISODate | null;
|
|
1705
|
+
}
|
|
1706
|
+
/** Audit definitions with each one's latest run. Admin only (all routes here). */
|
|
1707
|
+
declare function listAccessAudits(): Command<{
|
|
1708
|
+
data: AccessAudit[];
|
|
1709
|
+
}>;
|
|
1710
|
+
declare function createAccessAudit(data: {
|
|
1711
|
+
collection: string;
|
|
1712
|
+
subjects: AccessAuditSubject[];
|
|
1713
|
+
name?: string;
|
|
1714
|
+
}): Command<{
|
|
1715
|
+
data: AccessAudit;
|
|
1716
|
+
}>;
|
|
1717
|
+
declare function updateAccessAudit(id: number, data: Partial<{
|
|
1718
|
+
name: string;
|
|
1719
|
+
collection: string;
|
|
1720
|
+
subjects: AccessAuditSubject[];
|
|
1721
|
+
is_active: boolean;
|
|
1722
|
+
}>): Command<{
|
|
1723
|
+
data: AccessAudit;
|
|
1724
|
+
}>;
|
|
1725
|
+
declare function deleteAccessAudit(id: number): Command<{
|
|
1726
|
+
data: {
|
|
1727
|
+
deleted: boolean;
|
|
1728
|
+
};
|
|
1729
|
+
}>;
|
|
1730
|
+
/** Start a run (fire-and-forget — poll listAccessAuditRuns; 409 while one runs). */
|
|
1731
|
+
declare function runAccessAudit(id: number): Command<{
|
|
1732
|
+
data: AccessAuditRun;
|
|
1733
|
+
}>;
|
|
1734
|
+
/** Run history for an audit (newest first, capped 30). */
|
|
1735
|
+
declare function listAccessAuditRuns(id: number): Command<{
|
|
1736
|
+
data: AccessAuditRun[];
|
|
1737
|
+
}>;
|
|
1738
|
+
/** Paged findings for a run; filter by user id or search item label/id/email. */
|
|
1739
|
+
declare function readAccessAuditFindings(runId: number, options?: {
|
|
1740
|
+
page?: number;
|
|
1741
|
+
limit?: number;
|
|
1742
|
+
user?: string;
|
|
1743
|
+
search?: string;
|
|
1744
|
+
}): Command<{
|
|
1745
|
+
data: AccessAuditFinding[];
|
|
1746
|
+
total: number;
|
|
1747
|
+
}>;
|
|
1748
|
+
interface CoverageGapOwner {
|
|
1749
|
+
id: string;
|
|
1750
|
+
name: string;
|
|
1751
|
+
reason: 'suspended' | 'inactive' | 'redacted' | 'ooo_no_delegate';
|
|
1752
|
+
}
|
|
1753
|
+
interface CoverageGapItem {
|
|
1754
|
+
collection: string;
|
|
1755
|
+
item: string;
|
|
1756
|
+
label: string;
|
|
1757
|
+
state: string | null;
|
|
1758
|
+
template: string;
|
|
1759
|
+
kind: 'all_unavailable' | 'no_owners';
|
|
1760
|
+
owners: CoverageGapOwner[];
|
|
1761
|
+
}
|
|
1762
|
+
interface CoverageGapReport {
|
|
1763
|
+
open_instances: number;
|
|
1764
|
+
evaluated: number;
|
|
1765
|
+
truncated: boolean;
|
|
1766
|
+
blocked: CoverageGapItem[];
|
|
1767
|
+
no_owner_count: number;
|
|
1768
|
+
by_user: Array<{
|
|
1769
|
+
id: string;
|
|
1770
|
+
name: string;
|
|
1771
|
+
reason: CoverageGapOwner['reason'];
|
|
1772
|
+
blocked_count: number;
|
|
1773
|
+
}>;
|
|
1774
|
+
}
|
|
1775
|
+
/** Records whose entire resolved owner set cannot act (computed live). Admin only. */
|
|
1776
|
+
declare function readCoverageGaps(): Command<{
|
|
1777
|
+
data: CoverageGapReport;
|
|
1778
|
+
}>;
|
|
1779
|
+
interface IntegrationApiHealth {
|
|
942
1780
|
id: number;
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1781
|
+
name: string;
|
|
1782
|
+
base_url: string | null;
|
|
1783
|
+
auth_type: string | null;
|
|
1784
|
+
totals: Record<string, number>;
|
|
1785
|
+
last_success_at: ISODate | null;
|
|
1786
|
+
last_activity_at: ISODate | null;
|
|
1787
|
+
window_24h: Record<string, number>;
|
|
1788
|
+
last_failure: {
|
|
1789
|
+
error: string | null;
|
|
1790
|
+
at: ISODate;
|
|
1791
|
+
collection: string;
|
|
1792
|
+
item: string;
|
|
1793
|
+
} | null;
|
|
948
1794
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
}>;
|
|
952
|
-
declare function toggleReportAlert(id: UUID, alertId: UUID, isActive: boolean): Command<{
|
|
953
|
-
data: {
|
|
954
|
-
updated: boolean;
|
|
955
|
-
};
|
|
956
|
-
}>;
|
|
957
|
-
declare function deleteReportAlert(id: UUID, alertId: UUID): Command<{
|
|
1795
|
+
/** Per-external-API push outcomes + flow-run counts + the cron roster. Admin only. */
|
|
1796
|
+
declare function readIntegrationHealth(): Command<{
|
|
958
1797
|
data: {
|
|
959
|
-
|
|
1798
|
+
apis: IntegrationApiHealth[];
|
|
1799
|
+
crons: Array<Record<string, unknown>>;
|
|
1800
|
+
dead_letters_24h: number;
|
|
1801
|
+
flow_runs_24h: Record<string, number>;
|
|
960
1802
|
};
|
|
961
1803
|
}>;
|
|
962
1804
|
|
|
@@ -1113,6 +1955,39 @@ declare function approveAiProposal(id: string): Command<{
|
|
|
1113
1955
|
}>;
|
|
1114
1956
|
/** Reject an AI action proposal. */
|
|
1115
1957
|
declare function rejectAiProposal(id: string): Command<void>;
|
|
1958
|
+
interface AiReviewFinding {
|
|
1959
|
+
severity: 'error' | 'warning' | 'suggestion';
|
|
1960
|
+
/** Field name or area the finding is about. */
|
|
1961
|
+
field: string;
|
|
1962
|
+
message: string;
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
* Pre-submission record review: a findings list over the record plus up to 3
|
|
1966
|
+
* O2M child sets, guided by the collection's configured AI rules. Read-gated.
|
|
1967
|
+
*/
|
|
1968
|
+
declare function aiReview(body: {
|
|
1969
|
+
collection: string;
|
|
1970
|
+
item: string | number;
|
|
1971
|
+
}): Command<{
|
|
1972
|
+
data: {
|
|
1973
|
+
findings: AiReviewFinding[];
|
|
1974
|
+
};
|
|
1975
|
+
}>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Render a short plain-text briefing from caller-supplied context — the caller
|
|
1978
|
+
* gathers the data, this endpoint only writes the words. NOTE the response key
|
|
1979
|
+
* is `brief`, not `text`.
|
|
1980
|
+
*/
|
|
1981
|
+
declare function aiBrief(body: {
|
|
1982
|
+
/** The data to brief over (capped server-side at 16k chars). */
|
|
1983
|
+
context: string;
|
|
1984
|
+
/** Optional system-style instructions (capped at 1k chars). */
|
|
1985
|
+
instructions?: string;
|
|
1986
|
+
}): Command<{
|
|
1987
|
+
data: {
|
|
1988
|
+
brief: string;
|
|
1989
|
+
};
|
|
1990
|
+
}>;
|
|
1116
1991
|
|
|
1117
1992
|
/**
|
|
1118
1993
|
* Collaboration commands: tasks, approval chains, item locks, notifications
|
|
@@ -1443,71 +2318,573 @@ declare function deleteIssue(id: number): Command<void>;
|
|
|
1443
2318
|
declare function readNotificationCount(): Command<{
|
|
1444
2319
|
count: number;
|
|
1445
2320
|
}>;
|
|
1446
|
-
/** Mark one notification read. */
|
|
1447
|
-
declare function markNotificationRead(id: number): Command<void>;
|
|
1448
|
-
/** Mark every inbox notification read. */
|
|
1449
|
-
declare function markAllNotificationsRead(): Command<{
|
|
2321
|
+
/** Mark one notification read. */
|
|
2322
|
+
declare function markNotificationRead(id: number): Command<void>;
|
|
2323
|
+
/** Mark every inbox notification read. */
|
|
2324
|
+
declare function markAllNotificationsRead(): Command<{
|
|
2325
|
+
data: {
|
|
2326
|
+
updated: number;
|
|
2327
|
+
};
|
|
2328
|
+
}>;
|
|
2329
|
+
declare function deleteNotification(id: number): Command<void>;
|
|
2330
|
+
/** Whether soft edit-locking is enabled for a collection. */
|
|
2331
|
+
declare function readItemLockConfig(collection: string): Command<{
|
|
2332
|
+
data: {
|
|
2333
|
+
collection: string;
|
|
2334
|
+
item_locking_enabled: boolean;
|
|
2335
|
+
};
|
|
2336
|
+
}>;
|
|
2337
|
+
/** Toggle per-collection edit locking. Disabling releases all active locks. */
|
|
2338
|
+
declare function updateItemLockConfig(collection: string, enabled: boolean): Command<{
|
|
2339
|
+
data: {
|
|
2340
|
+
collection: string;
|
|
2341
|
+
item_locking_enabled: boolean;
|
|
2342
|
+
};
|
|
2343
|
+
}>;
|
|
2344
|
+
interface FieldWatch {
|
|
2345
|
+
id: number;
|
|
2346
|
+
name: string;
|
|
2347
|
+
collection: string;
|
|
2348
|
+
field: string;
|
|
2349
|
+
is_active: boolean;
|
|
2350
|
+
created_by: UUID;
|
|
2351
|
+
subscriber_count?: number;
|
|
2352
|
+
subscribed?: boolean;
|
|
2353
|
+
}
|
|
2354
|
+
declare function listFieldWatches(): Command<{
|
|
2355
|
+
data: FieldWatch[];
|
|
2356
|
+
}>;
|
|
2357
|
+
declare function readFieldWatch(id: number): Command<{
|
|
2358
|
+
data: FieldWatch;
|
|
2359
|
+
}>;
|
|
2360
|
+
declare function createFieldWatch(data: {
|
|
2361
|
+
name: string;
|
|
2362
|
+
collection: string;
|
|
2363
|
+
field: string;
|
|
2364
|
+
is_active?: boolean;
|
|
2365
|
+
}): Command<{
|
|
2366
|
+
data: FieldWatch;
|
|
2367
|
+
}>;
|
|
2368
|
+
declare function updateFieldWatch(id: number, data: {
|
|
2369
|
+
name?: string;
|
|
2370
|
+
collection?: string;
|
|
2371
|
+
field?: string;
|
|
2372
|
+
is_active?: boolean;
|
|
2373
|
+
}): Command<{
|
|
2374
|
+
data: FieldWatch;
|
|
2375
|
+
}>;
|
|
2376
|
+
declare function deleteFieldWatch(id: number): Command<void>;
|
|
2377
|
+
/** Subscribe the current user to change notifications for a watch
|
|
2378
|
+
* (requires read access to the watched collection). */
|
|
2379
|
+
declare function subscribeFieldWatch(id: number): Command<{
|
|
2380
|
+
data: {
|
|
2381
|
+
watch: number;
|
|
2382
|
+
user: UUID;
|
|
2383
|
+
};
|
|
2384
|
+
}>;
|
|
2385
|
+
declare function unsubscribeFieldWatch(id: number): Command<void>;
|
|
2386
|
+
type ChatRoomKind = 'global' | 'dm' | 'channel' | 'entity' | 'unknown';
|
|
2387
|
+
interface ChatRoomSummary {
|
|
2388
|
+
room: string;
|
|
2389
|
+
kind: ChatRoomKind;
|
|
2390
|
+
label: string | null;
|
|
2391
|
+
unread: number;
|
|
2392
|
+
muted: boolean;
|
|
2393
|
+
notify_mode: 'all' | 'mentions';
|
|
2394
|
+
joined: boolean;
|
|
2395
|
+
/** Channel rooms only. */
|
|
2396
|
+
channel: {
|
|
2397
|
+
id: number;
|
|
2398
|
+
visibility: 'open' | 'role' | 'private';
|
|
2399
|
+
role: string | null;
|
|
2400
|
+
topic: string | null;
|
|
2401
|
+
created_by: string | null;
|
|
2402
|
+
is_direct: boolean;
|
|
2403
|
+
} | null;
|
|
2404
|
+
last_message: {
|
|
2405
|
+
id: number;
|
|
2406
|
+
message: string;
|
|
2407
|
+
sender: string | null;
|
|
2408
|
+
sender_name: string | null;
|
|
2409
|
+
date_created: string;
|
|
2410
|
+
} | null;
|
|
2411
|
+
}
|
|
2412
|
+
interface ChatChannel {
|
|
2413
|
+
id: number;
|
|
2414
|
+
key: string;
|
|
2415
|
+
name: string;
|
|
2416
|
+
topic: string | null;
|
|
2417
|
+
visibility: 'open' | 'role' | 'private';
|
|
2418
|
+
role: string | null;
|
|
2419
|
+
created_by: string | null;
|
|
2420
|
+
is_archived: boolean;
|
|
2421
|
+
is_direct: boolean;
|
|
2422
|
+
}
|
|
2423
|
+
interface ChatDirectoryChannel extends ChatChannel {
|
|
2424
|
+
joined: boolean;
|
|
2425
|
+
members: number;
|
|
2426
|
+
}
|
|
2427
|
+
interface ChatReaction {
|
|
2428
|
+
emoji: string;
|
|
2429
|
+
user: string;
|
|
2430
|
+
user_name: string | null;
|
|
2431
|
+
}
|
|
2432
|
+
interface ChatMessage {
|
|
2433
|
+
id: number;
|
|
2434
|
+
room: string;
|
|
2435
|
+
message: string;
|
|
2436
|
+
sender: UUID | null;
|
|
2437
|
+
sender_name: string | null;
|
|
2438
|
+
date_created: ISODate;
|
|
2439
|
+
edited_at?: ISODate | null;
|
|
2440
|
+
deleted_at?: ISODate | null;
|
|
2441
|
+
attachments: string[];
|
|
2442
|
+
reactions: ChatReaction[];
|
|
2443
|
+
}
|
|
2444
|
+
interface ChatPin {
|
|
2445
|
+
pin_id: number;
|
|
2446
|
+
id: number;
|
|
2447
|
+
sender_name: string | null;
|
|
2448
|
+
message: string;
|
|
2449
|
+
date_created: ISODate;
|
|
2450
|
+
}
|
|
2451
|
+
interface ChatSearchHit {
|
|
2452
|
+
id: number;
|
|
2453
|
+
room: string;
|
|
2454
|
+
sender: UUID | null;
|
|
2455
|
+
sender_name: string | null;
|
|
2456
|
+
message: string;
|
|
2457
|
+
date_created: ISODate;
|
|
2458
|
+
}
|
|
2459
|
+
interface ChatChannelMember {
|
|
2460
|
+
user: UUID;
|
|
2461
|
+
first_name: string | null;
|
|
2462
|
+
last_name: string | null;
|
|
2463
|
+
email: string | null;
|
|
2464
|
+
joined_at: ISODate | null;
|
|
2465
|
+
}
|
|
2466
|
+
interface ChatRoomType {
|
|
2467
|
+
id: number;
|
|
2468
|
+
prefix: string;
|
|
2469
|
+
collection: string;
|
|
2470
|
+
match_field: string;
|
|
2471
|
+
label: string | null;
|
|
2472
|
+
is_active: boolean;
|
|
2473
|
+
}
|
|
2474
|
+
/** The current user's sidebar rooms (joined channels, DMs, global) with unread counts. */
|
|
2475
|
+
declare function listChatRooms(): Command<{
|
|
2476
|
+
data: ChatRoomSummary[];
|
|
2477
|
+
}>;
|
|
2478
|
+
/** Joinable channels (private ones appear only to members). Group DMs are excluded. */
|
|
2479
|
+
declare function readChatDirectory(search?: string): Command<{
|
|
2480
|
+
data: ChatDirectoryChannel[];
|
|
2481
|
+
}>;
|
|
2482
|
+
/** Newest messages in a room, ascending for rendering. `before` = message id cursor. */
|
|
2483
|
+
declare function listChatMessages(room: string, options?: {
|
|
2484
|
+
before?: number;
|
|
2485
|
+
limit?: number;
|
|
2486
|
+
}): Command<{
|
|
2487
|
+
data: ChatMessage[];
|
|
2488
|
+
}>;
|
|
2489
|
+
/** Send a message. `attachments` = uploaded nivaro_files ids; mentions notify explicitly. */
|
|
2490
|
+
declare function sendChatMessage(body: {
|
|
2491
|
+
room: string;
|
|
2492
|
+
message?: string;
|
|
2493
|
+
mentions?: string[];
|
|
2494
|
+
attachments?: string[];
|
|
2495
|
+
}): Command<{
|
|
2496
|
+
data: ChatMessage;
|
|
2497
|
+
}>;
|
|
2498
|
+
/** Edit your own message within the 15-minute window. Mentions are not re-fired. */
|
|
2499
|
+
declare function editChatMessage(id: number, message: string): Command<{
|
|
2500
|
+
data: {
|
|
2501
|
+
id: number;
|
|
2502
|
+
message: string;
|
|
2503
|
+
};
|
|
2504
|
+
}>;
|
|
2505
|
+
/** Soft-delete a message (own, or admin) — the row survives as a tombstone. */
|
|
2506
|
+
declare function deleteChatMessage(id: number): Command<{
|
|
2507
|
+
data: {
|
|
2508
|
+
deleted: boolean;
|
|
2509
|
+
};
|
|
2510
|
+
}>;
|
|
2511
|
+
/** Toggle a reaction from the fixed palette (👍 ✅ 👀 🎉 ❤️ 😂). */
|
|
2512
|
+
declare function toggleChatReaction(id: number, emoji: string): Command<{
|
|
2513
|
+
data: {
|
|
2514
|
+
toggled: string;
|
|
2515
|
+
on: boolean;
|
|
2516
|
+
};
|
|
2517
|
+
}>;
|
|
2518
|
+
/** Pin or unpin a message. Any room member may toggle. */
|
|
2519
|
+
declare function toggleChatPin(id: number): Command<{
|
|
2520
|
+
data: {
|
|
2521
|
+
pinned: boolean;
|
|
2522
|
+
};
|
|
2523
|
+
}>;
|
|
2524
|
+
/** Pinned messages in a room (newest 20). */
|
|
2525
|
+
declare function listChatPins(room: string): Command<{
|
|
2526
|
+
data: ChatPin[];
|
|
2527
|
+
}>;
|
|
2528
|
+
/** Search messages across the current user's sidebar rooms (min 2 chars). */
|
|
2529
|
+
declare function searchChatMessages(q: string): Command<{
|
|
2530
|
+
data: ChatSearchHit[];
|
|
2531
|
+
}>;
|
|
2532
|
+
/** Create a group DM (a private channel rendered as a conversation). */
|
|
2533
|
+
declare function createGroupDm(body: {
|
|
2534
|
+
user_ids: string[];
|
|
2535
|
+
name?: string;
|
|
2536
|
+
}): Command<{
|
|
2537
|
+
data: {
|
|
2538
|
+
room: string;
|
|
2539
|
+
name: string;
|
|
2540
|
+
};
|
|
2541
|
+
}>;
|
|
2542
|
+
/** Instance chat config — bot name/user id when the AI bot is enabled. */
|
|
2543
|
+
declare function readChatConfig(): Command<{
|
|
2544
|
+
data: {
|
|
2545
|
+
bot_name: string | null;
|
|
2546
|
+
bot_user_id: string | null;
|
|
2547
|
+
};
|
|
2548
|
+
}>;
|
|
2549
|
+
/** Mark a room read up to now. */
|
|
2550
|
+
declare function markChatRoomRead(room: string): Command<{
|
|
2551
|
+
data: {
|
|
2552
|
+
room: string;
|
|
2553
|
+
read: boolean;
|
|
2554
|
+
};
|
|
2555
|
+
}>;
|
|
2556
|
+
/** Join a room (adds it to the sidebar). Refused for rooms you cannot see. */
|
|
2557
|
+
declare function joinChatRoom(room: string): Command<{
|
|
2558
|
+
data: {
|
|
2559
|
+
room: string;
|
|
2560
|
+
joined: boolean;
|
|
2561
|
+
};
|
|
2562
|
+
}>;
|
|
2563
|
+
/** Leave a room (removes the membership row). */
|
|
2564
|
+
declare function leaveChatRoom(room: string): Command<{
|
|
2565
|
+
data: {
|
|
2566
|
+
room: string;
|
|
2567
|
+
joined: boolean;
|
|
2568
|
+
};
|
|
2569
|
+
}>;
|
|
2570
|
+
/** Update per-room notification settings. `notify_mode: 'mentions'` = mentions only, null = all. */
|
|
2571
|
+
declare function updateChatRoom(room: string, body: {
|
|
2572
|
+
muted?: boolean;
|
|
2573
|
+
notify_mode?: 'mentions' | null;
|
|
2574
|
+
}): Command<{
|
|
2575
|
+
data: {
|
|
2576
|
+
room: string;
|
|
2577
|
+
is_muted?: boolean;
|
|
2578
|
+
notify_mode?: string | null;
|
|
2579
|
+
};
|
|
2580
|
+
}>;
|
|
2581
|
+
/** DM read receipt — when the other participant last read the room. */
|
|
2582
|
+
declare function readChatPeerRead(room: string): Command<{
|
|
2583
|
+
data: {
|
|
2584
|
+
last_read_at: ISODate | null;
|
|
2585
|
+
};
|
|
2586
|
+
}>;
|
|
2587
|
+
/** Create a channel. Role-scoped channels require `role`. (Channel listing = readChatDirectory.) */
|
|
2588
|
+
declare function createChatChannel(body: {
|
|
2589
|
+
name: string;
|
|
2590
|
+
key?: string;
|
|
2591
|
+
topic?: string;
|
|
2592
|
+
visibility?: 'open' | 'role' | 'private';
|
|
2593
|
+
role?: string | null;
|
|
2594
|
+
}): Command<{
|
|
2595
|
+
data: ChatChannel;
|
|
2596
|
+
}>;
|
|
2597
|
+
/** Update a channel (owner or admin). */
|
|
2598
|
+
declare function updateChatChannel(id: number, body: Partial<{
|
|
2599
|
+
name: string;
|
|
2600
|
+
topic: string | null;
|
|
2601
|
+
visibility: 'open' | 'role' | 'private';
|
|
2602
|
+
role: string | null;
|
|
2603
|
+
is_archived: boolean;
|
|
2604
|
+
}>): Command<{
|
|
2605
|
+
data: ChatChannel;
|
|
2606
|
+
}>;
|
|
2607
|
+
/** Members of a channel (visible to anyone who can see the room). */
|
|
2608
|
+
declare function listChatChannelMembers(id: number): Command<{
|
|
2609
|
+
data: ChatChannelMember[];
|
|
2610
|
+
}>;
|
|
2611
|
+
/** Add someone to a channel (owner or admin). */
|
|
2612
|
+
declare function addChatChannelMember(id: number, userId: string): Command<{
|
|
2613
|
+
data: {
|
|
2614
|
+
room: string;
|
|
2615
|
+
user: string;
|
|
2616
|
+
};
|
|
2617
|
+
}>;
|
|
2618
|
+
/** Remove a member (self, owner, or admin). */
|
|
2619
|
+
declare function removeChatChannelMember(id: number, userId: string): Command<{
|
|
2620
|
+
data: {
|
|
2621
|
+
removed: boolean;
|
|
2622
|
+
};
|
|
2623
|
+
}>;
|
|
2624
|
+
/** Roles (id + name only) for the role-scoped channel picker — readable by any user. */
|
|
2625
|
+
declare function listChatRoles(): Command<{
|
|
2626
|
+
data: Array<{
|
|
2627
|
+
id: UUID;
|
|
2628
|
+
name: string;
|
|
2629
|
+
}>;
|
|
2630
|
+
}>;
|
|
2631
|
+
/** Entity-room registry — which room prefixes map to which collections. */
|
|
2632
|
+
declare function listChatRoomTypes(): Command<{
|
|
2633
|
+
data: ChatRoomType[];
|
|
2634
|
+
}>;
|
|
2635
|
+
/** Register an entity-room prefix (admin). `match_field` defaults to 'id'. */
|
|
2636
|
+
declare function createChatRoomType(body: {
|
|
2637
|
+
prefix: string;
|
|
2638
|
+
collection: string;
|
|
2639
|
+
match_field?: string;
|
|
2640
|
+
label?: string;
|
|
2641
|
+
}): Command<{
|
|
2642
|
+
data: ChatRoomType;
|
|
2643
|
+
}>;
|
|
2644
|
+
/** Update an entity-room registration (admin). */
|
|
2645
|
+
declare function updateChatRoomType(id: number, body: Partial<{
|
|
2646
|
+
collection: string;
|
|
2647
|
+
match_field: string;
|
|
2648
|
+
label: string | null;
|
|
2649
|
+
is_active: boolean;
|
|
2650
|
+
}>): Command<{
|
|
2651
|
+
data: ChatRoomType;
|
|
2652
|
+
}>;
|
|
2653
|
+
interface MyWorkSla {
|
|
2654
|
+
state_key: string;
|
|
2655
|
+
elapsed_hours: number;
|
|
2656
|
+
duration_hours: number | null;
|
|
2657
|
+
warning_threshold_pct: number | null;
|
|
2658
|
+
business_hours_only: boolean;
|
|
2659
|
+
status: 'ok' | 'warning' | 'breached' | null;
|
|
2660
|
+
remaining_hours: number | null;
|
|
2661
|
+
entered_at: ISODate;
|
|
2662
|
+
}
|
|
2663
|
+
interface MyWorkOwnedEntry {
|
|
2664
|
+
collection: string;
|
|
2665
|
+
item: string;
|
|
2666
|
+
label: string;
|
|
2667
|
+
state: string | null;
|
|
2668
|
+
state_color: string | null;
|
|
2669
|
+
url: string;
|
|
2670
|
+
sla: MyWorkSla | null;
|
|
2671
|
+
}
|
|
2672
|
+
interface MyWorkSummary {
|
|
2673
|
+
owned: MyWorkOwnedEntry[];
|
|
2674
|
+
owned_total: number;
|
|
2675
|
+
tasks: Array<{
|
|
2676
|
+
id: number;
|
|
2677
|
+
collection: string;
|
|
2678
|
+
item: string;
|
|
2679
|
+
title: string;
|
|
2680
|
+
due_date: ISODate | null;
|
|
2681
|
+
status: string;
|
|
2682
|
+
}>;
|
|
2683
|
+
approvals: Array<{
|
|
2684
|
+
id: number;
|
|
2685
|
+
collection: string;
|
|
2686
|
+
item: string;
|
|
2687
|
+
chain_name: string;
|
|
2688
|
+
current_step: number;
|
|
2689
|
+
}>;
|
|
2690
|
+
notifications: Array<{
|
|
2691
|
+
id: number;
|
|
2692
|
+
subject: string;
|
|
2693
|
+
message: string | null;
|
|
2694
|
+
sender: UUID | null;
|
|
2695
|
+
collection: string | null;
|
|
2696
|
+
item: string | null;
|
|
2697
|
+
timestamp: ISODate;
|
|
2698
|
+
}>;
|
|
2699
|
+
counts: {
|
|
2700
|
+
owned: number;
|
|
2701
|
+
owned_breached: number;
|
|
2702
|
+
owned_warning: number;
|
|
2703
|
+
tasks: number;
|
|
2704
|
+
approvals: number;
|
|
2705
|
+
notifications: number;
|
|
2706
|
+
};
|
|
2707
|
+
}
|
|
2708
|
+
/** The current user's actionable inbox: owned records (SLA-first), tasks,
|
|
2709
|
+
* approval steps, unread notifications. */
|
|
2710
|
+
declare function readMyWork(): Command<{
|
|
2711
|
+
data: MyWorkSummary;
|
|
2712
|
+
}>;
|
|
2713
|
+
/** Mark several notifications read in one call (own rows only, max 200 ids). */
|
|
2714
|
+
declare function markNotificationsRead(ids: Array<string | number>): Command<{
|
|
1450
2715
|
data: {
|
|
1451
2716
|
updated: number;
|
|
1452
2717
|
};
|
|
1453
2718
|
}>;
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
2719
|
+
/** Send a user-to-user notification. Sender is always the caller. */
|
|
2720
|
+
declare function createNotification(body: {
|
|
2721
|
+
recipient: string;
|
|
2722
|
+
subject: string;
|
|
2723
|
+
message?: string;
|
|
2724
|
+
collection?: string;
|
|
2725
|
+
item?: string;
|
|
2726
|
+
}): Command<{
|
|
2727
|
+
ok: boolean;
|
|
1461
2728
|
}>;
|
|
1462
|
-
/**
|
|
1463
|
-
|
|
2729
|
+
/** Admin broadcast: audience = users whose restrict-mode scope for `dimension`
|
|
2730
|
+
* intersects `values`, plus explicit `user_ids`. */
|
|
2731
|
+
declare function sendBulkNotification(body: {
|
|
2732
|
+
subject: string;
|
|
2733
|
+
message?: string;
|
|
2734
|
+
html?: string;
|
|
2735
|
+
dimension?: string;
|
|
2736
|
+
values?: Array<string | number>;
|
|
2737
|
+
user_ids?: string[];
|
|
2738
|
+
channels?: {
|
|
2739
|
+
inapp?: boolean;
|
|
2740
|
+
email?: boolean;
|
|
2741
|
+
};
|
|
2742
|
+
}): Command<{
|
|
1464
2743
|
data: {
|
|
1465
|
-
|
|
1466
|
-
|
|
2744
|
+
recipients: number;
|
|
2745
|
+
emails_sent: number;
|
|
1467
2746
|
};
|
|
1468
2747
|
}>;
|
|
1469
|
-
|
|
2748
|
+
type RecordLinkType = 'relates to' | 'supersedes' | 'duplicates' | 'blocks' | 'caused by';
|
|
2749
|
+
interface RecordLink {
|
|
1470
2750
|
id: number;
|
|
1471
|
-
|
|
2751
|
+
direction: 'out' | 'in';
|
|
2752
|
+
/** Incoming links carry the inverse phrasing ('superseded by' etc.). */
|
|
2753
|
+
type: string;
|
|
1472
2754
|
collection: string;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
subscriber_count?: number;
|
|
1477
|
-
subscribed?: boolean;
|
|
2755
|
+
item: string;
|
|
2756
|
+
label: string | null;
|
|
2757
|
+
note: string | null;
|
|
1478
2758
|
}
|
|
1479
|
-
|
|
1480
|
-
|
|
2759
|
+
/** Links attached to a record, both directions, labels for readable ends. */
|
|
2760
|
+
declare function listRecordLinks(collection: string, id: string | number): Command<{
|
|
2761
|
+
data: RecordLink[];
|
|
2762
|
+
}>;
|
|
2763
|
+
/** Link two records. `link_type` defaults to 'relates to'; duplicates 409. */
|
|
2764
|
+
declare function createRecordLink(body: {
|
|
2765
|
+
from_collection: string;
|
|
2766
|
+
from_item: string;
|
|
2767
|
+
to_collection: string;
|
|
2768
|
+
to_item: string;
|
|
2769
|
+
link_type?: RecordLinkType;
|
|
2770
|
+
note?: string;
|
|
2771
|
+
}): Command<{
|
|
2772
|
+
data: {
|
|
2773
|
+
linked: boolean;
|
|
2774
|
+
};
|
|
1481
2775
|
}>;
|
|
1482
|
-
|
|
1483
|
-
|
|
2776
|
+
/** Remove a link (requires read on the FROM side). */
|
|
2777
|
+
declare function deleteRecordLink(id: number): Command<{
|
|
2778
|
+
data: {
|
|
2779
|
+
deleted: boolean;
|
|
2780
|
+
};
|
|
1484
2781
|
}>;
|
|
1485
|
-
|
|
1486
|
-
|
|
2782
|
+
/** The current user's pinned item ids for a collection. */
|
|
2783
|
+
declare function listPinnedItems(collection: string): Command<{
|
|
2784
|
+
data: string[];
|
|
2785
|
+
}>;
|
|
2786
|
+
/** Pin or unpin a record for the current user. */
|
|
2787
|
+
declare function togglePinnedItem(collection: string, itemId: string | number): Command<{
|
|
2788
|
+
data: {
|
|
2789
|
+
pinned: boolean;
|
|
2790
|
+
};
|
|
2791
|
+
}>;
|
|
2792
|
+
interface LastTouch {
|
|
2793
|
+
action: string;
|
|
2794
|
+
timestamp: ISODate;
|
|
2795
|
+
user_id: UUID | null;
|
|
2796
|
+
user_name: string | null;
|
|
2797
|
+
}
|
|
2798
|
+
/** Newest create/update on a record ("Edited 3d ago by Beth"). `data: null` when untouched. */
|
|
2799
|
+
declare function readLastTouch(collection: string, id: string | number): Command<{
|
|
2800
|
+
data: LastTouch | null;
|
|
2801
|
+
}>;
|
|
2802
|
+
interface ViewSubscription {
|
|
2803
|
+
id: number;
|
|
2804
|
+
view_id: number;
|
|
2805
|
+
digest: 'daily' | 'weekly';
|
|
2806
|
+
is_active: boolean;
|
|
2807
|
+
last_run_at: ISODate | null;
|
|
2808
|
+
view_name: string;
|
|
1487
2809
|
collection: string;
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
data:
|
|
2810
|
+
}
|
|
2811
|
+
/** The current user's saved-view digest subscriptions. */
|
|
2812
|
+
declare function listViewSubscriptions(): Command<{
|
|
2813
|
+
data: ViewSubscription[];
|
|
1492
2814
|
}>;
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
is_active?: boolean;
|
|
2815
|
+
/** Subscribe to a saved view's new-records digest (upserts by view). */
|
|
2816
|
+
declare function createViewSubscription(body: {
|
|
2817
|
+
view_id: number;
|
|
2818
|
+
digest?: 'daily' | 'weekly';
|
|
1498
2819
|
}): Command<{
|
|
1499
|
-
data:
|
|
2820
|
+
data: {
|
|
2821
|
+
id: number;
|
|
2822
|
+
view_id: number;
|
|
2823
|
+
digest: string;
|
|
2824
|
+
};
|
|
1500
2825
|
}>;
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
2826
|
+
/** Unsubscribe (own rows only). Responds 204 with no body. */
|
|
2827
|
+
declare function deleteViewSubscription(id: number): Command<void>;
|
|
2828
|
+
interface AccessReason {
|
|
2829
|
+
type: 'permission' | 'not_found' | 'row_filter' | 'scope' | 'scope_strict';
|
|
2830
|
+
message: string;
|
|
2831
|
+
dimension?: string;
|
|
2832
|
+
dimension_label?: string;
|
|
2833
|
+
allowed_values?: string[];
|
|
2834
|
+
}
|
|
2835
|
+
/** Why a record is (in)visible to the current user — each access gate re-run
|
|
2836
|
+
* separately, reasons only, never record data. */
|
|
2837
|
+
declare function explainRecordAccess(collection: string, id: string | number): Command<{
|
|
1505
2838
|
data: {
|
|
1506
|
-
|
|
1507
|
-
|
|
2839
|
+
access: boolean;
|
|
2840
|
+
reasons: AccessReason[];
|
|
1508
2841
|
};
|
|
1509
2842
|
}>;
|
|
1510
|
-
|
|
2843
|
+
/** Ask admins for access to a hidden record. Deduped per user+record per day
|
|
2844
|
+
* (`already: true` on a repeat). */
|
|
2845
|
+
declare function requestRecordAccess(body: {
|
|
2846
|
+
collection: string;
|
|
2847
|
+
item: string;
|
|
2848
|
+
note?: string;
|
|
2849
|
+
}): Command<{
|
|
2850
|
+
data: {
|
|
2851
|
+
requested: boolean;
|
|
2852
|
+
already?: boolean;
|
|
2853
|
+
notified?: number;
|
|
2854
|
+
};
|
|
2855
|
+
}>;
|
|
2856
|
+
interface OnlinePresenceUser {
|
|
2857
|
+
user_id: UUID | null;
|
|
2858
|
+
display_name: string | null;
|
|
2859
|
+
role_name: string | null;
|
|
2860
|
+
current_path: string | null;
|
|
2861
|
+
last_seen: ISODate;
|
|
2862
|
+
is_idle: boolean;
|
|
2863
|
+
last_active: ISODate | null;
|
|
2864
|
+
/** Server-rendered "Collection › Record label" for the current path. */
|
|
2865
|
+
page: string | null;
|
|
2866
|
+
app: string | null;
|
|
2867
|
+
typing_room: string | null;
|
|
2868
|
+
scopes: string[];
|
|
2869
|
+
scopes_by_dimension: Record<string, string[]>;
|
|
2870
|
+
/** Live session recording id — admins only, null otherwise. */
|
|
2871
|
+
recording_id: string | null;
|
|
2872
|
+
}
|
|
2873
|
+
interface OnlinePresenceConfig {
|
|
2874
|
+
fields: string[];
|
|
2875
|
+
scope_dimensions: string[];
|
|
2876
|
+
admin_url: string;
|
|
2877
|
+
dimensions: Array<{
|
|
2878
|
+
name: string;
|
|
2879
|
+
label: string;
|
|
2880
|
+
}>;
|
|
2881
|
+
}
|
|
2882
|
+
/** Who is online, scoped by the viewer's own restrictions, with instance
|
|
2883
|
+
* display config. Response carries `config` beside `data`. */
|
|
2884
|
+
declare function readOnlinePresence(): Command<{
|
|
2885
|
+
data: OnlinePresenceUser[];
|
|
2886
|
+
config: OnlinePresenceConfig;
|
|
2887
|
+
}>;
|
|
1511
2888
|
|
|
1512
2889
|
/**
|
|
1513
2890
|
* Content-operations commands: export, draft/publish, scheduled changes,
|
|
@@ -1920,6 +3297,8 @@ declare function createAddendum(body: {
|
|
|
1920
3297
|
data?: Record<string, unknown>;
|
|
1921
3298
|
cost_impact?: number | null;
|
|
1922
3299
|
timeline_impact_days?: number | null;
|
|
3300
|
+
/** nivaro_files ids to attach (server caps at 50). */
|
|
3301
|
+
attachments?: string[];
|
|
1923
3302
|
}): Command<{
|
|
1924
3303
|
data: Addendum;
|
|
1925
3304
|
}>;
|
|
@@ -2007,6 +3386,118 @@ declare function updateLayoutUngroupedSort(id: number, ungroupedSort: number): C
|
|
|
2007
3386
|
ungrouped_sort: number;
|
|
2008
3387
|
};
|
|
2009
3388
|
}>;
|
|
3389
|
+
interface RecordViewRecap {
|
|
3390
|
+
/** Baseline of the recap — the caller's previous visit. */
|
|
3391
|
+
since: ISODate;
|
|
3392
|
+
/** Number of distinct fields other users changed since then. */
|
|
3393
|
+
field_changes: number;
|
|
3394
|
+
/** Human labels of the changed fields (first 8). */
|
|
3395
|
+
fields: string[];
|
|
3396
|
+
/** Comments by others since the baseline. */
|
|
3397
|
+
comments: number;
|
|
3398
|
+
/** Workflow transitions by others since the baseline. */
|
|
3399
|
+
transitions: number;
|
|
3400
|
+
/** Display names of the people who edited (first 5). */
|
|
3401
|
+
editors: string[];
|
|
3402
|
+
}
|
|
3403
|
+
/**
|
|
3404
|
+
* Roll the caller's view watermark for a record and get back the recap of what
|
|
3405
|
+
* OTHERS changed since the previous visit, in one round trip. `data` is null on
|
|
3406
|
+
* a first visit, a same-session refresh with no prior baseline, or when nothing
|
|
3407
|
+
* changed. Call when opening a record.
|
|
3408
|
+
*/
|
|
3409
|
+
declare function touchRecordView(collection: string, id: string | number): Command<{
|
|
3410
|
+
data: RecordViewRecap | null;
|
|
3411
|
+
}>;
|
|
3412
|
+
interface FieldChangeEntry {
|
|
3413
|
+
/** The value the field BECAME at this point. */
|
|
3414
|
+
value: unknown;
|
|
3415
|
+
/** Resolved display label — M2O FK → related record label, select value → choice text. */
|
|
3416
|
+
display: string | null;
|
|
3417
|
+
timestamp: ISODate | null;
|
|
3418
|
+
user_name: string | null;
|
|
3419
|
+
action: string;
|
|
3420
|
+
}
|
|
3421
|
+
/**
|
|
3422
|
+
* One field's actual value changes (newest first, max 25) mined from revision
|
|
3423
|
+
* deltas — consecutive identical values are deduped, M2O FKs resolve to display
|
|
3424
|
+
* labels. Distinct from `readFieldHistory`, which reads the older
|
|
3425
|
+
* /items/…/field-history route.
|
|
3426
|
+
*/
|
|
3427
|
+
declare function readFieldChangeHistory(collection: string, id: string | number, field: string): Command<{
|
|
3428
|
+
data: FieldChangeEntry[];
|
|
3429
|
+
}>;
|
|
3430
|
+
interface ImportPreviewDiff {
|
|
3431
|
+
/** 1-based file row (header = row 1). */
|
|
3432
|
+
row: number;
|
|
3433
|
+
id: string;
|
|
3434
|
+
kind: 'changed' | 'conflict';
|
|
3435
|
+
/** Present on conflicts: why the operator must look. */
|
|
3436
|
+
reason?: string;
|
|
3437
|
+
fields: Array<{
|
|
3438
|
+
field: string;
|
|
3439
|
+
old: unknown;
|
|
3440
|
+
new: unknown;
|
|
3441
|
+
}>;
|
|
3442
|
+
}
|
|
3443
|
+
interface ImportPreview {
|
|
3444
|
+
/** Rows scanned (capped at 5,000 — `truncated` flags a bigger file). */
|
|
3445
|
+
total: number;
|
|
3446
|
+
truncated: boolean;
|
|
3447
|
+
new: number;
|
|
3448
|
+
unchanged: number;
|
|
3449
|
+
changed: number;
|
|
3450
|
+
/** Existing-and-differs under strategy 'skip', or duplicate ids within the file. */
|
|
3451
|
+
conflicts: number;
|
|
3452
|
+
field_change_counts: Record<string, number>;
|
|
3453
|
+
/** Field-level old→new diffs for the first 50 changed/conflicted rows. */
|
|
3454
|
+
diffs: ImportPreviewDiff[];
|
|
3455
|
+
}
|
|
3456
|
+
/**
|
|
3457
|
+
* Dry-run a CSV import (admin) — mirrors the real import's matching exactly
|
|
3458
|
+
* (same id_field lookup, same strategy semantics) without writing anything.
|
|
3459
|
+
*/
|
|
3460
|
+
declare function previewImportJob(body: {
|
|
3461
|
+
collection: string;
|
|
3462
|
+
/** Raw CSV text including the header row. */
|
|
3463
|
+
csv_data: string;
|
|
3464
|
+
/** { csvColumn: fieldName } */
|
|
3465
|
+
column_map?: Record<string, string>;
|
|
3466
|
+
id_field?: string | null;
|
|
3467
|
+
/** Defaults to 'skip'. */
|
|
3468
|
+
duplicate_strategy?: string;
|
|
3469
|
+
}): Command<{
|
|
3470
|
+
data: ImportPreview;
|
|
3471
|
+
}>;
|
|
3472
|
+
interface RelatedCommentEntry {
|
|
3473
|
+
id: string;
|
|
3474
|
+
source: 'transition' | 'change_reason' | 'addendum' | 'note';
|
|
3475
|
+
label: string;
|
|
3476
|
+
text: string;
|
|
3477
|
+
user: string | null;
|
|
3478
|
+
user_name: string | null;
|
|
3479
|
+
created_at: ISODate;
|
|
3480
|
+
/** Where the note came from ("Draft → Review", "Forecasts · 2026 · amount"). */
|
|
3481
|
+
context: string | null;
|
|
3482
|
+
}
|
|
3483
|
+
/**
|
|
3484
|
+
* Read-only notes recorded about a record from other surfaces — workflow
|
|
3485
|
+
* transition comments, change reasons (own + child rows), addendum reasons,
|
|
3486
|
+
* and conventional note child tables. Time-ordered oldest first; merge with
|
|
3487
|
+
* `listComments` for the full thread.
|
|
3488
|
+
*/
|
|
3489
|
+
declare function listRelatedComments(collection: string, item: string | number): Command<{
|
|
3490
|
+
data: RelatedCommentEntry[];
|
|
3491
|
+
}>;
|
|
3492
|
+
/**
|
|
3493
|
+
* Distinct non-null values of one PHYSICAL column, ascending — for
|
|
3494
|
+
* column-filter dropdowns. `limit` is clamped to 1–500 (default 200).
|
|
3495
|
+
*/
|
|
3496
|
+
declare function readDistinctValues(collection: string, field: string, options?: {
|
|
3497
|
+
limit?: number;
|
|
3498
|
+
}): Command<{
|
|
3499
|
+
data: unknown[];
|
|
3500
|
+
}>;
|
|
2010
3501
|
|
|
2011
3502
|
/**
|
|
2012
3503
|
* Developer-experience commands: dev-tools exports, webhook deliveries,
|
|
@@ -2508,6 +3999,277 @@ declare function executeBulkAction(actionId: string, data: {
|
|
|
2508
3999
|
}): Command<{
|
|
2509
4000
|
data: unknown;
|
|
2510
4001
|
}>;
|
|
4002
|
+
type PreflightSeverity = 'ok' | 'warn' | 'fail';
|
|
4003
|
+
interface PreflightCheck {
|
|
4004
|
+
id: string;
|
|
4005
|
+
status: PreflightSeverity;
|
|
4006
|
+
/** One plain sentence for the operator. */
|
|
4007
|
+
summary: string;
|
|
4008
|
+
detail?: Record<string, unknown>;
|
|
4009
|
+
}
|
|
4010
|
+
interface PreflightReport {
|
|
4011
|
+
status: PreflightSeverity;
|
|
4012
|
+
version: string;
|
|
4013
|
+
environment: string;
|
|
4014
|
+
checks: PreflightCheck[];
|
|
4015
|
+
ts: ISODate;
|
|
4016
|
+
}
|
|
4017
|
+
/**
|
|
4018
|
+
* Deploy coherence check: migrations (both directions), db/redis reachability,
|
|
4019
|
+
* required extensions, version pinning. Responds 503 when status is 'fail' so
|
|
4020
|
+
* CI can branch on the status code alone.
|
|
4021
|
+
*/
|
|
4022
|
+
declare function readPreflight(): Command<{
|
|
4023
|
+
data: PreflightReport;
|
|
4024
|
+
}>;
|
|
4025
|
+
interface CronJob {
|
|
4026
|
+
id: string;
|
|
4027
|
+
expression: string;
|
|
4028
|
+
/** Set when the job was registered by an extension. */
|
|
4029
|
+
extensionId?: string;
|
|
4030
|
+
nextRun: ISODate | null;
|
|
4031
|
+
}
|
|
4032
|
+
/** All scheduled jobs (core + extension-registered). */
|
|
4033
|
+
declare function listCronJobs(): Command<{
|
|
4034
|
+
data: CronJob[];
|
|
4035
|
+
}>;
|
|
4036
|
+
/** Run a scheduled job now, out of band. Resolves after the job completes. */
|
|
4037
|
+
declare function runCronJob(id: string): Command<{
|
|
4038
|
+
data: {
|
|
4039
|
+
id: string;
|
|
4040
|
+
ran: boolean;
|
|
4041
|
+
duration_ms: number;
|
|
4042
|
+
};
|
|
4043
|
+
}>;
|
|
4044
|
+
interface TraceSpan {
|
|
4045
|
+
seq: number;
|
|
4046
|
+
phase: string;
|
|
4047
|
+
ms: number;
|
|
4048
|
+
/** Offset from request start (waterfall layout). */
|
|
4049
|
+
at: number;
|
|
4050
|
+
detail?: string;
|
|
4051
|
+
}
|
|
4052
|
+
interface RequestTrace {
|
|
4053
|
+
id: string;
|
|
4054
|
+
method: string;
|
|
4055
|
+
route: string;
|
|
4056
|
+
url: string;
|
|
4057
|
+
status: number;
|
|
4058
|
+
user: string | null;
|
|
4059
|
+
total_ms: number;
|
|
4060
|
+
spans: TraceSpan[];
|
|
4061
|
+
ts: string;
|
|
4062
|
+
unaccounted_ms: number;
|
|
4063
|
+
}
|
|
4064
|
+
/**
|
|
4065
|
+
* Slow-request traces from THIS replica's in-process ring buffer (requests
|
|
4066
|
+
* faster than TRACE_SLOW_MS are never recorded). `limit` caps at 200;
|
|
4067
|
+
* `route` is a substring filter.
|
|
4068
|
+
*/
|
|
4069
|
+
declare function listTraces(query?: {
|
|
4070
|
+
limit?: number;
|
|
4071
|
+
route?: string;
|
|
4072
|
+
}): Command<{
|
|
4073
|
+
data: {
|
|
4074
|
+
config: Record<string, unknown>;
|
|
4075
|
+
traces: Array<RequestTrace & {
|
|
4076
|
+
slowest_phase: string | null;
|
|
4077
|
+
}>;
|
|
4078
|
+
};
|
|
4079
|
+
}>;
|
|
4080
|
+
declare function readTrace(id: string): Command<{
|
|
4081
|
+
data: RequestTrace;
|
|
4082
|
+
}>;
|
|
4083
|
+
declare function clearTraces(): Command<{
|
|
4084
|
+
data: {
|
|
4085
|
+
cleared: boolean;
|
|
4086
|
+
};
|
|
4087
|
+
}>;
|
|
4088
|
+
interface ConfigTableClassification {
|
|
4089
|
+
config: string[];
|
|
4090
|
+
derived: string[];
|
|
4091
|
+
runtime: string[];
|
|
4092
|
+
/** Present in the database but in none of the lists — a new migration. */
|
|
4093
|
+
unclassified: string[];
|
|
4094
|
+
/** Classified but absent from this database — an older instance. */
|
|
4095
|
+
absent: string[];
|
|
4096
|
+
}
|
|
4097
|
+
interface ConfigSnapshot {
|
|
4098
|
+
format: 1;
|
|
4099
|
+
generated_at: string;
|
|
4100
|
+
instance: {
|
|
4101
|
+
version: string;
|
|
4102
|
+
environment: string;
|
|
4103
|
+
database: string;
|
|
4104
|
+
label?: string;
|
|
4105
|
+
};
|
|
4106
|
+
classification: ConfigTableClassification;
|
|
4107
|
+
/** table → row id → hashed/serialized row. */
|
|
4108
|
+
tables: Record<string, Record<string, unknown>>;
|
|
4109
|
+
/** Tables that were requested but could not be read, with the reason. */
|
|
4110
|
+
errors: Record<string, string>;
|
|
4111
|
+
}
|
|
4112
|
+
/** What this instance considers configuration (with row counts), without shipping any of it. */
|
|
4113
|
+
declare function readConfigInventory(): Command<{
|
|
4114
|
+
data: {
|
|
4115
|
+
instance: {
|
|
4116
|
+
version: string;
|
|
4117
|
+
environment: string;
|
|
4118
|
+
database: string;
|
|
4119
|
+
};
|
|
4120
|
+
classification: ConfigTableClassification;
|
|
4121
|
+
counts: Record<string, number>;
|
|
4122
|
+
};
|
|
4123
|
+
}>;
|
|
4124
|
+
/**
|
|
4125
|
+
* Export this instance's config snapshot for comparison on another instance.
|
|
4126
|
+
* Secrets are DROPPED, not masked. Activity-logged.
|
|
4127
|
+
*/
|
|
4128
|
+
declare function exportConfigSnapshot(options?: {
|
|
4129
|
+
label?: string;
|
|
4130
|
+
/** Restrict to specific tables. */
|
|
4131
|
+
tables?: string[];
|
|
4132
|
+
}): Command<{
|
|
4133
|
+
data: ConfigSnapshot;
|
|
4134
|
+
}>;
|
|
4135
|
+
/**
|
|
4136
|
+
* Compare an uploaded snapshot (`theirs`) against this instance's live config
|
|
4137
|
+
* (`mine`). Body is the snapshot itself or `{snapshot}`. NOTE: real snapshots
|
|
4138
|
+
* are routinely far past 1MB — this route accepts bodies up to 128MB.
|
|
4139
|
+
*/
|
|
4140
|
+
declare function compareConfigSnapshot(snapshot: unknown): Command<{
|
|
4141
|
+
data: unknown;
|
|
4142
|
+
}>;
|
|
4143
|
+
interface LayoutVersion {
|
|
4144
|
+
id: number;
|
|
4145
|
+
version: number;
|
|
4146
|
+
note: string | null;
|
|
4147
|
+
created_at: ISODate;
|
|
4148
|
+
created_by_name: string;
|
|
4149
|
+
}
|
|
4150
|
+
/** Snapshot history for a layout (newest first, pruned to 30 server-side). */
|
|
4151
|
+
declare function listLayoutVersions(layoutId: number): Command<{
|
|
4152
|
+
data: LayoutVersion[];
|
|
4153
|
+
}>;
|
|
4154
|
+
/**
|
|
4155
|
+
* Restore a layout version — id-preserving; a "before restore" snapshot is
|
|
4156
|
+
* captured first so the restore itself is reversible.
|
|
4157
|
+
*/
|
|
4158
|
+
declare function restoreLayoutVersion(layoutId: number, versionId: number): Command<{
|
|
4159
|
+
data: {
|
|
4160
|
+
restored_assignments: number;
|
|
4161
|
+
restored_groups: number;
|
|
4162
|
+
};
|
|
4163
|
+
}>;
|
|
4164
|
+
interface OmniSearchHit {
|
|
4165
|
+
collection: string;
|
|
4166
|
+
collection_label: string;
|
|
4167
|
+
id: string;
|
|
4168
|
+
label: string;
|
|
4169
|
+
score: number;
|
|
4170
|
+
matched_field: string | null;
|
|
4171
|
+
}
|
|
4172
|
+
/**
|
|
4173
|
+
* Cross-collection record search, resolved AS the requesting user (RBAC + RLS
|
|
4174
|
+
* + scopes). `q` must be at least 2 characters. Distinct from `globalSearch`
|
|
4175
|
+
* (the command palette route) and `semanticSearch` (vector similarity).
|
|
4176
|
+
*/
|
|
4177
|
+
declare function omniSearch(q: string, options?: {
|
|
4178
|
+
collections?: string[];
|
|
4179
|
+
limit?: number;
|
|
4180
|
+
per_collection?: number;
|
|
4181
|
+
}): Command<{
|
|
4182
|
+
data: OmniSearchHit[];
|
|
4183
|
+
meta: {
|
|
4184
|
+
searched: number;
|
|
4185
|
+
skipped: string[];
|
|
4186
|
+
truncated: boolean;
|
|
4187
|
+
};
|
|
4188
|
+
}>;
|
|
4189
|
+
interface FlowTestStep {
|
|
4190
|
+
key: string;
|
|
4191
|
+
name: string;
|
|
4192
|
+
type: string;
|
|
4193
|
+
status: 'resolve' | 'reject' | 'async';
|
|
4194
|
+
/** Rendered side-effect content when dry_run rendered instead of sending. */
|
|
4195
|
+
preview?: unknown;
|
|
4196
|
+
}
|
|
4197
|
+
/**
|
|
4198
|
+
* Test-run a flow with a caller-supplied payload, regardless of active status.
|
|
4199
|
+
* dry_run defaults TRUE: side-effect ops (mail/webhook/…) render but do not
|
|
4200
|
+
* send. The run records in flow history with trigger 'test'.
|
|
4201
|
+
*/
|
|
4202
|
+
declare function testFlow(flowId: string, body?: {
|
|
4203
|
+
payload?: Record<string, unknown>;
|
|
4204
|
+
dry_run?: boolean;
|
|
4205
|
+
}): Command<{
|
|
4206
|
+
data: {
|
|
4207
|
+
steps: FlowTestStep[];
|
|
4208
|
+
output: Record<string, unknown>;
|
|
4209
|
+
error: string | null;
|
|
4210
|
+
dry_run: boolean;
|
|
4211
|
+
};
|
|
4212
|
+
}>;
|
|
4213
|
+
interface FlowReplayResult {
|
|
4214
|
+
dry_run: boolean;
|
|
4215
|
+
matched: number;
|
|
4216
|
+
truncated: boolean;
|
|
4217
|
+
skipped_deletes: number;
|
|
4218
|
+
/** Dry run only: first 20 matched activity rows. */
|
|
4219
|
+
sample?: Array<{
|
|
4220
|
+
id: number;
|
|
4221
|
+
collection: string;
|
|
4222
|
+
action: string;
|
|
4223
|
+
item: string;
|
|
4224
|
+
timestamp: string;
|
|
4225
|
+
}>;
|
|
4226
|
+
/** Real run only. */
|
|
4227
|
+
executed?: number;
|
|
4228
|
+
failed?: number;
|
|
4229
|
+
missing?: number;
|
|
4230
|
+
}
|
|
4231
|
+
/**
|
|
4232
|
+
* Replay an event-trigger flow over a historical window (admin) — re-executes
|
|
4233
|
+
* once per matching create/update in nivaro_activity. dry_run defaults TRUE
|
|
4234
|
+
* (count + sample first — replays fan out real side effects); the payload is
|
|
4235
|
+
* the record's CURRENT row with `$replay: true`, deletes are skipped, and
|
|
4236
|
+
* before-timing flows are refused (400).
|
|
4237
|
+
*/
|
|
4238
|
+
declare function replayFlow(flowId: string, body: {
|
|
4239
|
+
/** ISO datetime, required. */
|
|
4240
|
+
from: string;
|
|
4241
|
+
/** ISO datetime, required — must be after `from`. */
|
|
4242
|
+
to: string;
|
|
4243
|
+
/** Defaults to true. Pass false to actually execute. */
|
|
4244
|
+
dry_run?: boolean;
|
|
4245
|
+
/** Max writes to replay, 1–1000 (default 500). */
|
|
4246
|
+
limit?: number;
|
|
4247
|
+
}): Command<{
|
|
4248
|
+
data: FlowReplayResult;
|
|
4249
|
+
}>;
|
|
4250
|
+
/**
|
|
4251
|
+
* Mint a masquerade token (admin): a short-lived `nvm_…` Bearer token that
|
|
4252
|
+
* resolves to the target user for up to 4h, with RBAC/RLS genuinely running
|
|
4253
|
+
* as them. Activity-logged.
|
|
4254
|
+
*/
|
|
4255
|
+
declare function startMasquerade(userId: string): Command<{
|
|
4256
|
+
data: {
|
|
4257
|
+
token: string;
|
|
4258
|
+
user: {
|
|
4259
|
+
id: UUID;
|
|
4260
|
+
first_name: string | null;
|
|
4261
|
+
last_name: string | null;
|
|
4262
|
+
email: string;
|
|
4263
|
+
};
|
|
4264
|
+
};
|
|
4265
|
+
}>;
|
|
4266
|
+
/**
|
|
4267
|
+
* Revoke the current masquerade session. MUST be called with the `nvm_` token
|
|
4268
|
+
* as the Bearer — 400 otherwise. Bare `{ok}` response, no data envelope.
|
|
4269
|
+
*/
|
|
4270
|
+
declare function stopMasquerade(): Command<{
|
|
4271
|
+
ok: boolean;
|
|
4272
|
+
}>;
|
|
2511
4273
|
|
|
2512
4274
|
/**
|
|
2513
4275
|
* File manager commands: listing, metadata, presigned uploads, updates,
|
|
@@ -5169,4 +6931,4 @@ declare function submitFormItem(collection: string, values: Record<string, unkno
|
|
|
5169
6931
|
data: Record<string, unknown>;
|
|
5170
6932
|
}>;
|
|
5171
6933
|
|
|
5172
|
-
export { type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type CollectionLayout, type CollectionPresetSummary, type Command, type Comment, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CustomQuery, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DraftPublishConfig, type DraftStatus, type ErpSubmission, type ErpSubmissionStatus, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldHistoryEntry, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowRun, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportJob, type ImportParseResponse, type ImportTemplateSummary, type InstanceOwner, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type LayoutAssignment, type LayoutGroup, type ListResponse, type ManagedUser, type MyTask, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PluginSlots, type Policy, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordTemplate, type RegisteredAction, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSubscription, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetType, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskStatus, type TimelineEvent, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type VirtualCollection, type Webhook, type WebhookDelivery, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, acquireItemLock, activateLayout, addInstanceOwner, addSubRow, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, cloneItem, cloneLayout, cloneReport, completeTask, createAddendum, createAlertDefinition, createAlertSubscription, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createHierarchyConfig, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createNivaro, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordTemplate, createReport, createReportAlert, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportFilterPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, desc, disableTwoFactor, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, exportBlueprint, exportContent, exportContentBundle, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, importExternalApiSpec, importSchemaSnapshot, includeInPicker, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listCollectionPresets, listCollectionRecordTemplates, listComments, listCustomQueries, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHierarchyConfigs, listImportJobs, listImportTemplates, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listQueueViews, listQueues, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listReportAlerts, listReportFilterPresets, listReports, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listSessionRecordings, listShareLinks, listSlaRules, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listThroughputCollections, listTreePermissions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markNotificationRead, moveTreeNode, presignFileUpload, previewContentBundle, previewReportWidget, publishItem, queryVirtualCollection, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalChain, readAtRiskSummary, readBackupManifest, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readDataQualityRun, readDetailLayout, readDraftPublishConfig, readErpSubmissionHistory, readFieldConfig, readFieldHistory, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readInstanceOwners, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readLayoutAssignments, readLayoutGroups, readMe, readMyScopes, readNotificationCount, readNotificationSubscriptionStats, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportFilterOptions, readReportSubscription, readReportWidgetData, readRevision, readRevisions, readRole, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStateOwnerGroups, readStateOwners, readSyncJob, readTask, readThroughputReport, readTimeline, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, reportClientError, resetReportCache, resolveReportAlert, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runActivityReport, runActivityReportCsv, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveMyScopeDefaults, saveReportFilterPreset, saveReportWidgets, saveUserScope, semanticSearch, sendTestMail, sessionRecordingEnabled, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, startApproval, startSessionRecording, startWorkflow, submitAddendum, submitFormItem, submitItemForReview, submitToErp, subscribeFieldWatch, suggestQueueLabels, switchWorkspace, testExternalApi, testWebhook, toggleReportAlert, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, updateAddendum, updateAiSettings, updateAlertDefinition, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHierarchyConfig, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor };
|
|
6934
|
+
export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionPresetSummary, type Command, type Comment, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CronJob, type CustomQuery, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DraftPublishConfig, type DraftStatus, type ErpSubmission, type ErpSubmissionStatus, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldHistoryEntry, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InstanceOwner, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type LastTouch, type LayoutAssignment, type LayoutGroup, type LayoutVersion, type ListResponse, type ManagedUser, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PluginSlots, type Policy, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskStatus, type TimelineEvent, type TraceSpan, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cancelStagedImport, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, disableTwoFactor, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainRecordAccess, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, importExternalApiSpec, importSchemaSnapshot, includeInPicker, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, omniSearch, presignFileUpload, previewContentBundle, previewImportJob, previewReportWidget, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDataQualityRun, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readFieldChangeHistory, readFieldConfig, readFieldHistory, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInstanceOwners, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readLastTouch, readLayoutAssignments, readLayoutGroups, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRevision, readRevisions, readRole, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSyncJob, readTask, readThroughputReport, readTimeline, readTrace, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, reportClientError, requestRecordAccess, requeueStagedImport, resetReportCache, resolveReportAlert, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor };
|