File size: 985 Bytes
d790e98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

export interface CheckResult {
  name: string;
  passed: boolean;
  reason: string;
}

// Single analysis returns HTML string in result_table
export interface SingleAnalysisReport {
  classification: string;
  detailed_results: [string, string | number][];
  html?: string; // Keeping for backward compatibility if needed, but optional
}

// Added AnalysisReport for geminiService
export interface AnalysisReport {
  isCompliant: boolean;
  overallScore: number;
  checks: CheckResult[];
}

// Batch analysis streams JSON updates
export interface BatchStreamResult {
  filename: string;
  status: 'pass' | 'fail' | 'error';
  score?: number;
  details?: string;
  labels?: string[];
  error?: string;
}

export interface BatchItem {
  id: string;
  file: File;
  previewUrl: string;
  status: 'pending' | 'processing' | 'completed' | 'error';
  result?: 'pass' | 'fail';
  score?: number;
  labels?: string[];
  error?: string;
}

export type ViewState = 'home' | 'single' | 'batch';