chore: regenerate OpenAPI types and remove type assertion hacks
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m2s
CI / docker (push) Successful in 56s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 39s

Regenerated schema.d.ts from live backend — now includes slaCompliance
on ExecutionStats/RouteMetrics, filterMatched/duplicateMessage on
ProcessorNode, and all new dashboard endpoints (timeseries/by-app,
timeseries/by-route, punchcard, errors/top, app-settings).

Removed Record<string, unknown> casts that were working around the
stale schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-30 15:36:44 +02:00
parent 474738a894
commit a517785050
5 changed files with 456 additions and 5514 deletions

File diff suppressed because one or more lines are too long

486
ui/src/api/schema.d.ts vendored
View File

@@ -122,6 +122,25 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/admin/app-settings/{appId}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Get settings for a specific application (returns defaults if not configured) */
get: operations["getByAppId"];
/** Create or update settings for an application */
put: operations["update"];
post?: never;
/** Delete application settings (reverts to defaults) */
delete: operations["delete"];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/search/executions": { "/search/executions": {
parameters: { parameters: {
query?: never; query?: never;
@@ -594,7 +613,7 @@ export interface paths {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
/** Aggregate execution stats (P99 latency, active count) */ /** Aggregate execution stats (P99 latency, active count, SLA compliance) */
get: operations["stats"]; get: operations["stats"];
put?: never; put?: never;
post?: never; post?: never;
@@ -621,6 +640,74 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/search/stats/timeseries/by-route": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Timeseries grouped by route for an application */
get: operations["timeseriesByRoute"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/search/stats/timeseries/by-app": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Timeseries grouped by application */
get: operations["timeseriesByApp"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/search/stats/punchcard": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Transaction punchcard: weekday x hour grid (rolling 7 days) */
get: operations["punchcard"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/search/errors/top": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Top N errors with velocity trend */
get: operations["topErrors"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/routes/metrics": { "/routes/metrics": {
parameters: { parameters: {
query?: never; query?: never;
@@ -725,7 +812,7 @@ export interface paths {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
/** Get exchange snapshot for a specific processor */ /** Get exchange snapshot for a specific processor by index */
get: operations["getProcessorSnapshot"]; get: operations["getProcessorSnapshot"];
put?: never; put?: never;
post?: never; post?: never;
@@ -742,8 +829,8 @@ export interface paths {
path?: never; path?: never;
cookie?: never; cookie?: never;
}; };
/** Get exchange snapshot for a processor by processorId */ /** Get exchange snapshot for a specific processor by processorId */
get: operations["getProcessorSnapshotById"]; get: operations["processorSnapshotById"];
put?: never; put?: never;
post?: never; post?: never;
delete?: never; delete?: never;
@@ -812,6 +899,26 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/config/{application}/processor-routes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get processor to route mapping
* @description Returns a map of processorId → routeId for all processors seen in this application
*/
get: operations["getProcessorRouteMapping"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/auth/oidc/config": { "/auth/oidc/config": {
parameters: { parameters: {
query?: never; query?: never;
@@ -1092,6 +1199,23 @@ export interface paths {
patch?: never; patch?: never;
trace?: never; trace?: never;
}; };
"/admin/app-settings": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** List all application settings */
get: operations["getAll"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/admin/opensearch/indices/{name}": { "/admin/opensearch/indices/{name}": {
parameters: { parameters: {
query?: never; query?: never;
@@ -1127,7 +1251,7 @@ export interface components {
tracedProcessors?: { tracedProcessors?: {
[key: string]: string; [key: string]: string;
}; };
logForwardingLevel?: string; applicationLogLevel?: string;
taps?: components["schemas"]["TapDefinition"][]; taps?: components["schemas"]["TapDefinition"][];
/** Format: int32 */ /** Format: int32 */
tapVersion?: number; tapVersion?: number;
@@ -1135,6 +1259,10 @@ export interface components {
[key: string]: boolean; [key: string]: boolean;
}; };
compressSuccess?: boolean; compressSuccess?: boolean;
agentLogLevel?: string;
routeSamplingRates?: {
[key: string]: number;
};
}; };
TapDefinition: { TapDefinition: {
tapId?: string; tapId?: string;
@@ -1284,6 +1412,51 @@ export interface components {
/** Format: uuid */ /** Format: uuid */
parentGroupId?: string; parentGroupId?: string;
}; };
/** @description Per-application dashboard settings */
AppSettingsRequest: {
/**
* Format: int32
* @description SLA duration threshold in milliseconds
*/
slaThresholdMs: number;
/**
* Format: double
* @description Error rate % threshold for warning (yellow) health dot
*/
healthErrorWarn: number;
/**
* Format: double
* @description Error rate % threshold for critical (red) health dot
*/
healthErrorCrit: number;
/**
* Format: double
* @description SLA compliance % threshold for warning (yellow) health dot
*/
healthSlaWarn: number;
/**
* Format: double
* @description SLA compliance % threshold for critical (red) health dot
*/
healthSlaCrit: number;
};
AppSettings: {
appId?: string;
/** Format: int32 */
slaThresholdMs?: number;
/** Format: double */
healthErrorWarn?: number;
/** Format: double */
healthErrorCrit?: number;
/** Format: double */
healthSlaWarn?: number;
/** Format: double */
healthSlaCrit?: number;
/** Format: date-time */
createdAt?: string;
/** Format: date-time */
updatedAt?: string;
};
SearchRequest: { SearchRequest: {
status?: string; status?: string;
/** Format: date-time */ /** Format: date-time */
@@ -1330,7 +1503,7 @@ export interface components {
attributes: { attributes: {
[key: string]: string; [key: string]: string;
}; };
hasTraceData?: boolean; hasTraceData: boolean;
}; };
SearchResultExecutionSummary: { SearchResultExecutionSummary: {
data: components["schemas"]["ExecutionSummary"][]; data: components["schemas"]["ExecutionSummary"][];
@@ -1508,6 +1681,8 @@ export interface components {
prevAvgDurationMs: number; prevAvgDurationMs: number;
/** Format: int64 */ /** Format: int64 */
prevP99LatencyMs: number; prevP99LatencyMs: number;
/** Format: double */
slaCompliance: number;
}; };
StatsTimeseries: { StatsTimeseries: {
buckets: components["schemas"]["TimeseriesBucket"][]; buckets: components["schemas"]["TimeseriesBucket"][];
@@ -1526,6 +1701,28 @@ export interface components {
/** Format: int64 */ /** Format: int64 */
activeCount: number; activeCount: number;
}; };
PunchcardCell: {
/** Format: int32 */
weekday?: number;
/** Format: int32 */
hour?: number;
/** Format: int64 */
totalCount?: number;
/** Format: int64 */
failedCount?: number;
};
TopError: {
errorType?: string;
routeId?: string;
processorId?: string;
/** Format: int64 */
count?: number;
/** Format: double */
velocity?: number;
trend?: string;
/** Format: date-time */
lastSeen?: string;
};
/** @description Aggregated route performance metrics */ /** @description Aggregated route performance metrics */
RouteMetrics: { RouteMetrics: {
routeId: string; routeId: string;
@@ -1543,6 +1740,8 @@ export interface components {
/** Format: double */ /** Format: double */
throughputPerSec: number; throughputPerSec: number;
sparkline: number[]; sparkline: number[];
/** Format: double */
slaCompliance: number;
}; };
ProcessorMetrics: { ProcessorMetrics: {
processorId: string; processorId: string;
@@ -1586,6 +1785,8 @@ export interface components {
exchangeCount: number; exchangeCount: number;
/** Format: date-time */ /** Format: date-time */
lastSeen: string; lastSeen: string;
/** @description The from() endpoint URI, e.g. 'direct:processOrder' */
fromEndpointUri: string;
}; };
/** @description Application log entry from OpenSearch */ /** @description Application log entry from OpenSearch */
LogEntryResponse: { LogEntryResponse: {
@@ -1627,12 +1828,12 @@ export interface components {
attributes: { attributes: {
[key: string]: string; [key: string]: string;
}; };
errorType?: string; errorType: string;
errorCategory?: string; errorCategory: string;
rootCauseType?: string; rootCauseType: string;
rootCauseMessage?: string; rootCauseMessage: string;
traceId?: string; traceId: string;
spanId?: string; spanId: string;
}; };
ProcessorNode: { ProcessorNode: {
processorId: string; processorId: string;
@@ -1644,30 +1845,32 @@ export interface components {
endTime: string; endTime: string;
/** Format: int64 */ /** Format: int64 */
durationMs: number; durationMs: number;
/** Format: int32 */
loopIndex?: number;
/** Format: int32 */
loopSize?: number;
/** Format: int32 */
splitIndex?: number;
/** Format: int32 */
splitSize?: number;
/** Format: int32 */
multicastIndex?: number;
errorMessage: string; errorMessage: string;
errorStackTrace: string; errorStackTrace: string;
attributes: { attributes: {
[key: string]: string; [key: string]: string;
}; };
resolvedEndpointUri?: string; /** Format: int32 */
errorType?: string; loopIndex: number;
errorCategory?: string; /** Format: int32 */
rootCauseType?: string; loopSize: number;
rootCauseMessage?: string; /** Format: int32 */
errorHandlerType?: string; splitIndex: number;
circuitBreakerState?: string; /** Format: int32 */
fallbackTriggered?: boolean; splitSize: number;
hasTraceData?: boolean; /** Format: int32 */
multicastIndex: number;
resolvedEndpointUri: string;
errorType: string;
errorCategory: string;
rootCauseType: string;
rootCauseMessage: string;
errorHandlerType: string;
circuitBreakerState: string;
fallbackTriggered: boolean;
filterMatched: boolean;
duplicateMessage: boolean;
hasTraceData: boolean;
children: components["schemas"]["ProcessorNode"][]; children: components["schemas"]["ProcessorNode"][];
}; };
DiagramLayout: { DiagramLayout: {
@@ -2527,6 +2730,74 @@ export interface operations {
}; };
}; };
}; };
getByAppId: {
parameters: {
query?: never;
header?: never;
path: {
appId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["AppSettings"];
};
};
};
};
update: {
parameters: {
query?: never;
header?: never;
path: {
appId: string;
};
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["AppSettingsRequest"];
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["AppSettings"];
};
};
};
};
delete: {
parameters: {
query?: never;
header?: never;
path: {
appId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content?: never;
};
};
};
searchGet: { searchGet: {
parameters: { parameters: {
query?: { query?: {
@@ -3512,6 +3783,107 @@ export interface operations {
}; };
}; };
}; };
timeseriesByRoute: {
parameters: {
query: {
from: string;
to?: string;
buckets?: number;
application: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": {
[key: string]: components["schemas"]["StatsTimeseries"];
};
};
};
};
};
timeseriesByApp: {
parameters: {
query: {
from: string;
to?: string;
buckets?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": {
[key: string]: components["schemas"]["StatsTimeseries"];
};
};
};
};
};
punchcard: {
parameters: {
query?: {
application?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["PunchcardCell"][];
};
};
};
};
topErrors: {
parameters: {
query: {
from: string;
to?: string;
application?: string;
routeId?: string;
limit?: number;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["TopError"][];
};
};
};
};
getMetrics: { getMetrics: {
parameters: { parameters: {
query?: { query?: {
@@ -3680,7 +4052,7 @@ export interface operations {
}; };
}; };
}; };
getProcessorSnapshotById: { processorSnapshotById: {
parameters: { parameters: {
query?: never; query?: never;
header?: never; header?: never;
@@ -3721,8 +4093,7 @@ export interface operations {
query: { query: {
application: string; application: string;
routeId: string; routeId: string;
/** @description Layout direction: LR (left-to-right) or TB (top-to-bottom) */ direction?: string;
direction?: "LR" | "TB";
}; };
header?: never; header?: never;
path?: never; path?: never;
@@ -3753,8 +4124,7 @@ export interface operations {
renderDiagram: { renderDiagram: {
parameters: { parameters: {
query?: { query?: {
/** @description Layout direction: LR (left-to-right) or TB (top-to-bottom) */ direction?: string;
direction?: "LR" | "TB";
}; };
header?: never; header?: never;
path: { path: {
@@ -3805,6 +4175,30 @@ export interface operations {
}; };
}; };
}; };
getProcessorRouteMapping: {
parameters: {
query?: never;
header?: never;
path: {
application: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Mapping returned */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": {
[key: string]: string;
};
};
};
};
};
getConfig_2: { getConfig_2: {
parameters: { parameters: {
query?: never; query?: never;
@@ -4199,6 +4593,26 @@ export interface operations {
}; };
}; };
}; };
getAll: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"*/*": components["schemas"]["AppSettings"][];
};
};
};
};
deleteIndex: { deleteIndex: {
parameters: { parameters: {
query?: never; query?: never;

View File

@@ -61,8 +61,8 @@ function buildOverlay(
subRouteFailed: subRouteFailed || undefined, subRouteFailed: subRouteFailed || undefined,
hasTraceData: !!proc.hasTraceData, hasTraceData: !!proc.hasTraceData,
resolvedEndpointUri: proc.resolvedEndpointUri || undefined, resolvedEndpointUri: proc.resolvedEndpointUri || undefined,
filterMatched: (proc as Record<string, unknown>).filterMatched as boolean | undefined, filterMatched: proc.filterMatched ?? undefined,
duplicateMessage: (proc as Record<string, unknown>).duplicateMessage as boolean | undefined, duplicateMessage: proc.duplicateMessage ?? undefined,
}); });
// Recurse into children // Recurse into children

View File

@@ -142,7 +142,7 @@ function aggregateByApp(
// SLA compliance: weighted average of per-route slaCompliance from backend // SLA compliance: weighted average of per-route slaCompliance from backend
const appSettings = settingsMap.get(appId); const appSettings = settingsMap.get(appId);
const slaWeightedSum = routes.reduce((s, r) => s + ((r as Record<string, unknown>).slaCompliance as number ?? 100) * r.exchangeCount, 0); const slaWeightedSum = routes.reduce((s, r) => s + (r.slaCompliance ?? 100) * r.exchangeCount, 0);
const slaCompliance = totalExchanges > 0 ? slaWeightedSum / totalExchanges : 100; const slaCompliance = totalExchanges > 0 ? slaWeightedSum / totalExchanges : 100;
const errorCount = Math.round(totalFailed); const errorCount = Math.round(totalFailed);
@@ -316,7 +316,7 @@ export default function DashboardL1() {
); );
// Global SLA compliance from backend stats (exact calculation from executions table) // Global SLA compliance from backend stats (exact calculation from executions table)
const globalSlaCompliance = (stats as Record<string, unknown>)?.slaCompliance as number ?? -1; const globalSlaCompliance = stats?.slaCompliance ?? -1;
const effectiveSlaCompliance = globalSlaCompliance >= 0 ? globalSlaCompliance : 100; const effectiveSlaCompliance = globalSlaCompliance >= 0 ? globalSlaCompliance : 100;
// Active error count = distinct error types // Active error count = distinct error types

View File

@@ -292,7 +292,7 @@ export default function DashboardL2() {
successRate: m.successRate, successRate: m.successRate,
avgDurationMs: m.avgDurationMs, avgDurationMs: m.avgDurationMs,
p99DurationMs: m.p99DurationMs, p99DurationMs: m.p99DurationMs,
slaCompliance: (m as Record<string, unknown>).slaCompliance as number ?? -1, slaCompliance: m.slaCompliance ?? -1,
sparkline: m.sparkline ?? [], sparkline: m.sparkline ?? [],
})), })),
[metrics], [metrics],