Rentenversicherer/types.ts
Kenearos d2ea8a0cd4 feat: Initialize AutoForm AI project structure
Sets up the basic project structure for AutoForm AI, including:
- Vite for build tooling and development server.
- React and ReactDOM for the UI.
- TypeScript for static typing.
- Essential dependencies for PDF manipulation (jspdf, pdf-lib) and AI integration (@google/genai).
- Basic HTML structure and styling.
- Component definitions and service interfaces for future development.
- A README with local development instructions.
2026-01-28 19:23:47 +01:00

40 lines
916 B
TypeScript

export interface ValidationResult {
status: 'VALID' | 'WARNING' | 'INVALID';
message?: string;
suggestion?: string;
}
export interface ExtractedField {
key?: string; // The PDF field name (internal ID)
label: string; // Human readable label
value: string;
confidence?: string;
sourceContext?: string;
validation?: ValidationResult;
isVerified?: boolean; // Track if user has explicitly checked this field
coordinates?: {
pageIndex: number;
x: number; // 0-1000 scale
y: number; // 0-1000 scale
};
}
export interface FormResponse {
fields: ExtractedField[];
summary: string;
}
export enum AppStatus {
IDLE = 'IDLE',
PROCESSING = 'PROCESSING',
REVIEW = 'REVIEW',
SUCCESS = 'SUCCESS',
ERROR = 'ERROR'
}
export interface FileData {
file: File;
previewUrl: string | null;
base64: string;
type: 'application/pdf' | 'image/png' | 'image/jpeg' | 'image/webp';
}