feat(snapshots): evolution API, tactic breakdown and dashboard trend chart [FASE-5.2]
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
This commit is contained in:
@@ -12,10 +12,28 @@ export interface SnapshotSummary {
|
||||
not_covered_count: number;
|
||||
in_progress_count: number;
|
||||
not_evaluated_count: number;
|
||||
coverage_percentage?: number;
|
||||
by_tactic?: Record<string, unknown>;
|
||||
by_status?: Record<string, number>;
|
||||
stale_count?: number;
|
||||
never_tested_count?: number;
|
||||
created_by: string | null;
|
||||
created_at: string | null;
|
||||
}
|
||||
|
||||
export interface CoverageEvolutionPoint {
|
||||
date: string | null;
|
||||
name: string | null;
|
||||
org_score: number;
|
||||
coverage_pct: number;
|
||||
by_tactic: Record<string, unknown>;
|
||||
by_status: Record<string, number>;
|
||||
stale_count: number;
|
||||
never_tested_count: number;
|
||||
validated_count: number;
|
||||
total_techniques: number;
|
||||
}
|
||||
|
||||
export interface TechniqueState {
|
||||
mitre_id: string;
|
||||
technique_id: string;
|
||||
@@ -76,6 +94,17 @@ export async function getSnapshot(snapshotId: string): Promise<SnapshotDetail> {
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Coverage trend points for dashboard charts. */
|
||||
export async function getCoverageEvolution(
|
||||
months = 12,
|
||||
): Promise<CoverageEvolutionPoint[]> {
|
||||
const { data } = await client.get<CoverageEvolutionPoint[]>(
|
||||
"/snapshots/evolution",
|
||||
{ params: { months } },
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
/** Compare two snapshots. */
|
||||
export async function compareSnapshots(
|
||||
aId: string,
|
||||
|
||||
Reference in New Issue
Block a user