/** * UC-UI Library - API Response Models * * This file contains interfaces for API responses used by services. */ /** * Single model AI inference response */ export interface AIInferenceResponse { /** Request ID */ request_id: string; /** Model used */ model: string; /** Generated response text */ response: string; /** Inference time in milliseconds */ inference_time_ms: number; /** Status */ status: string; } /** * Document analysis response */ export interface DocumentResponse { /** Status */ status: string; /** Response text */ response: string; /** Processing time in milliseconds */ time_ms: number; /** Number of chunks used */ chunks_used: number; /** Error message if any */ error_message?: string; } /** * GST Quick Summary from backend API * Values can be string '-' when data is unavailable */ export interface GstQuickSummary { /** GST registration number */ gst_number: string | number; /** Registration date */ registration_date: string | number; /** GST status (Active, Inactive, etc.) */ gst_status: string | number; /** Filing compliance percentage */ filing_compliance: string | number; /** Average monthly turnover */ avg_monthly_turnover: string | number; /** Last filing date */ last_filing_date: string | number; /** Last filing status */ last_filing_status: string | number; /** Total sales amount */ total_sales: string | number; /** Total purchases amount */ total_purchases: string | number; /** Total tax paid */ total_tax_paid: string | number; /** Total tax collected */ total_tax_collected: string | number; /** Year-over-year sales growth */ yoy_sales_growth: string | number; /** Year-over-year purchase growth */ yoy_purchase_growth: string | number; /** Month-over-month sales growth */ mom_sales_growth: string | number; /** Month-over-month purchase growth */ mom_purchase_growth: string | number; } /** * Bureau/CIBIL Quick Summary from backend API * Values can be string '-' when data is unavailable */ export interface BureauQuickSummary { /** CIBIL credit score */ cibil_score: string | number; /** CIBIL score remarks (good, average, poor, etc.) */ cibil_remarks: string | number; /** Total number of accounts */ total_accounts: string | number; /** Number of active accounts */ active_accounts: string | number; /** Credit utilization percentage */ credit_utilization: string | number; /** Number of on-time payments */ ontime_payments: string | number; /** Number of delayed payments */ delayed_payments: string | number; /** Number of defaulted payments */ defaulted_payments: string | number; /** Credit enquiries in last 30 days */ last_30_days_credit_enquiries: string | number; /** Credit enquiries in last 90 days */ last_90_days_credit_enquiries: string | number; /** Credit enquiries in last 6 months */ last_6_months_credit_enquiries: string | number; /** Loan details summary */ loan_details: string | number; } /** * Financial Statement Quick Summary from backend API * Values can be string '-' when data is unavailable */ export interface FinancialQuickSummary { /** Total assets */ total_assets: string | number; /** Total liabilities */ total_liabilities: string | number; /** Net worth */ net_worth: string | number; /** Current ratio */ current_ratio: string | number; /** Debt to equity ratio */ debt_equity_ratio: string | number; /** Total revenue */ total_revenue: string | number; /** Net profit */ net_profit: string | number; /** Gross profit */ gross_profit: string | number; /** Operating profit */ operating_profit: string | number; /** Cash flow from operations */ cash_flow_from_operations: string | number; /** Working capital */ working_capital: string | number; /** Interest coverage ratio */ interest_coverage_ratio: string | number; /** Return on equity */ return_on_equity: string | number; /** Return on assets */ return_on_assets: string | number; } /** * Combined Quick Summary object from backend */ export interface QuickSummary { /** GST quick summary data */ gst?: GstQuickSummary; /** Bureau/CIBIL quick summary data */ bureau?: BureauQuickSummary; /** Financial statement quick summary data */ financial?: FinancialQuickSummary; } /** * Multi-model inference response */ export interface MultiModelInferenceResponse { /** Request ID */ request_id: string; /** Overall status */ status: string; /** Individual responses by document type */ responses: { /** GST document response */ gst?: DocumentResponse; /** Bureau document response */ bureau?: DocumentResponse; /** Financial document response */ financial?: DocumentResponse; /** Go/No-Go response */ go_nogo?: DocumentResponse; }; /** Quick summary data for overview cards */ quick_summary?: QuickSummary; /** Total processing time in milliseconds */ total_time_ms: number; /** List of errors */ errors: string[]; } /** * Profiling list item */ export interface ProfilingListItem { /** Profiling ID */ id: number; /** Request ID */ request_id: string; /** Generated at timestamp */ generated_at: string | null; /** Start time */ start_time: string | null; /** End time */ end_time: string | null; /** Total duration in milliseconds */ total_duration_ms: number; /** Status */ status: 'success' | 'failed'; /** Document type */ document_type: string | null; /** Model name */ model_name: string | null; /** Query preview */ query_preview: string | null; } /** * Profiling detail (includes markdown) */ export interface ProfilingDetail extends ProfilingListItem { /** Full profiling markdown */ profiling_md: string; } /** * Profiling list API response */ export interface ProfilingListResponse { /** Status */ status: string; /** Total count */ total: number; /** Limit */ limit: number; /** Offset */ offset: number; /** Profiling items */ data: ProfilingListItem[]; } /** * Profiling detail API response */ export interface ProfilingDetailResponse { /** Status */ status: string; /** Profiling detail */ data: ProfilingDetail; } /** * Profiling statistics */ export interface ProfilingStats { /** Total count */ total_count: number; /** Success count */ success_count: number; /** Failed count */ failed_count: number; /** Average duration in milliseconds */ avg_duration_ms: number; /** Minimum duration in milliseconds */ min_duration_ms: number; /** Maximum duration in milliseconds */ max_duration_ms: number; /** First profiling timestamp */ first_profiling: string | null; /** Last profiling timestamp */ last_profiling: string | null; } /** * Profiling stats API response */ export interface ProfilingStatsResponse { /** Status */ status: string; /** Statistics data */ data: ProfilingStats; } /** * Profiling filters */ export interface ProfilingFilters { /** Status filter */ status?: 'success' | 'failed' | null; /** Start date filter */ startDate?: string | null; /** End date filter */ endDate?: string | null; /** Request ID filter */ requestId?: string | null; /** Document type filter */ documentType?: string | null; /** Sort by duration */ sortByDuration?: 'high' | 'low' | null; /** Time period filter */ timePeriod?: 'today' | 'yesterday' | 'last_week' | 'last_month' | null; } /** * Bureau loan detail */ export { BureauLoanDetail, BureauData, PackageTestResponse } from './loan-summary.model'; /** * Login request */ export interface LoginRequest { /** Username */ username: string; /** Password */ password: string; } /** * Login response */ export interface LoginResponse { /** Status */ status: string; /** Last login timestamp */ lastLoginTimestamp: string; /** Message */ message: string; }