/** * UC-UI Library - Loan Summary Data Models * * This file contains all interfaces and types related to loan summary data. * These models are used across all UC-UI components. */ /** * Borrower/Company information details */ export interface BorrowerInformation { /** Company/Borrower name */ name: string; /** Corporate Identification Number */ cin: string; /** Date of Incorporation */ doi: string; /** Director Identification Number */ din: string; /** Registered address */ address: string; /** PAN number */ pan: string; /** GST number */ gst: string; } /** * Director information details */ export interface DirectorInformation { /** Director name */ name: string; /** Director Identification Number */ din: string; /** PAN number */ pan: string; /** PAN verification status */ panStatus: string; /** Address */ address: string; /** Phone number */ phoneNumber: string; /** Email ID */ emailId: string; /** Role in company */ role: string; /** Years of experience */ experience: number; /** Number of other directorships */ otherDirectorships: number; /** Educational qualification */ qualification: string; /** Shareholding percentage */ shareholding: number; /** Date of appointment */ appointedDate: string; } /** * Loan facility information */ export interface LoanFacilityInformation { /** Type of facility */ facility: string; /** Nature of limit */ natureOfLimit: string; /** Amount requested */ amountRequested: number; /** Tenure of loan */ tenure: string; } /** * Payment history breakdown */ export interface PaymentHistory { /** Number of on-time payments */ onTimePayments: number; /** Number of delayed payments */ delayedPayments: number; /** Number of defaulted payments */ defaulted: number; } /** * Credit enquiries summary */ export interface CreditEnquiries { /** Enquiries in last 30 days */ last30Days: number; /** Enquiries in last 90 days */ last90Days: number; /** Enquiries in last 6 months */ last6Months: number; } /** * Individual loan details */ export interface LoanDetail { /** Lender name */ lender: string; /** Type of loan */ loanType: string; /** Sanctioned amount */ sanctioned: number; /** Outstanding amount */ outstanding: number; /** Days Past Due */ dpd: number; /** Loan status */ status: 'Active' | 'Closed' | 'Delayed'; } /** * Credit bureau details */ export interface CreditBureauDetails { /** Credit score */ creditScore: number; /** Score date */ scoreDate: string; /** Days Past Due */ dpd: number; /** SMA status */ sma: string; /** NPA status */ npa: boolean; /** Willful defaulter status */ willfulDefaulterStatus: boolean; /** Suit filed status */ suitFiledStatus: boolean; /** Recovery suit filed status */ recoverySuitFiledStatus: boolean; /** Fraud reported status */ fraudReportedStatus: boolean; /** Outstanding loan amount */ outstandingLoanAmount: number; /** Total loan amount */ totalLoanAmount: number; /** Total EMI amount */ totalEmiAmount: number; /** Total overdue amount */ totalOverdueAmount: number; /** Total number of loans */ totalNoOfLoans: number; /** Total number of active loans */ totalNoOfActiveLoans: number; /** Total number of closed loans */ totalNoOfClosedLoans: number; /** Credit utilization percentage */ creditUtilization: number; /** Payment history */ paymentHistory: PaymentHistory; /** Credit enquiries */ creditEnquiries: CreditEnquiries; /** Loan details */ loanDetails: LoanDetail[]; } /** * Commercial credit assessment details */ export interface CommercialCreditAssessmentDetails { /** Assessment score */ creditAssessmentScore: number; /** Assessment grade */ creditAssessmentGrade: string; /** Assessment remarks */ creditAssessmentRemarks: string; } /** * CRIF score details */ export interface CrifScoreDetails { /** CRIF score */ crifScore: number; /** CRIF grade */ crifGrade: string; /** CRIF remarks */ crifRemarks: string; } /** * Combined credit summary */ export interface CreditSummary { /** Credit bureau details */ creditBureauDetails: CreditBureauDetails; /** Commercial credit assessment */ commercialCreditAssessmentDetails: CommercialCreditAssessmentDetails; /** CRIF score details */ crifScoreDetails: CrifScoreDetails; } /** * GST monthly return data */ export interface GstMonthlyReturn { /** Month */ month: string; /** Total sales */ totalSales: number; /** Total purchases */ totalPurchases: number; /** Total tax paid */ totalTaxPaid: number; } /** * GST filing history entry */ export interface GstFilingHistory { /** Filing period */ period: string; /** Return type */ returnType: string; /** Filed date */ filedDate: string; /** Filing status */ status: 'Filed' | 'Pending' | 'Delayed'; } /** * GST turnover trend data point */ export interface GstTurnoverTrend { /** Month */ month: string; /** Turnover amount */ turnover: number; } /** * GST summary details */ export interface GstSummary { /** GST number */ gstNumber: string; /** GST registration date */ gstRegistrationDate: string; /** GST status */ gstStatus: 'Active' | 'Inactive'; /** Return filing status */ gstReturnFilingStatus: string; /** Filing frequency */ gstReturnFilingFrequency: string; /** Total sales */ totalSales: number; /** Total purchases */ totalPurchases: number; /** Total tax paid */ totalTaxPaid: number; /** Total tax collected */ totalTaxCollected: number; /** Year-over-year sales growth */ yoySalesGrowth: number; /** Year-over-year purchase growth */ yoyPurchaseGrowth: number; /** Month-over-month sales growth */ momSalesGrowth: number; /** Month-over-month purchase growth */ momPurchaseGrowth: number; /** Filing compliance percentage */ filingCompliance: number; /** Average monthly turnover */ avgMonthlyTurnover: number; /** Last filing date */ lastFilingDate: string; /** Last filing status */ lastFilingStatus: 'On Time' | 'Delayed'; /** Turnover trend data */ turnoverTrend: GstTurnoverTrend[]; /** Monthly returns data */ monthlyReturns: GstMonthlyReturn[]; /** Filing history */ filingHistory: GstFilingHistory[]; } /** * Balance sheet summary */ export interface BalanceSheetSummary { /** Total assets */ totalAssets: number; /** Total liabilities */ totalLiabilities: number; /** Net worth */ netWorth: number; /** Current ratio */ currentRatio: number; /** Debt to equity ratio */ debtEquityRatio: number; /** Total revenue */ totalRevenue: number; /** Gross profit */ grossProfit: number; /** Net profit */ netProfit: number; /** Operating profit */ operatingProfit: number; /** Working capital */ workingCapital: number; /** Interest coverage ratio */ interestCoverageRatio: number; /** Return on equity (%) */ returnOnEquity: number; /** Return on assets (%) */ returnOnAssets: number; } /** * Generic risk details */ export interface RiskDetails { /** Risk score */ riskScore: number; /** Risk grade */ riskGrade: string; /** Risk remarks */ riskRemarks: string; } /** * Risk factor for analysis */ export interface RiskFactor { /** Factor name */ name: string; /** Factor weight */ weight: number; /** Factor score */ score: number; /** Icon name */ icon: string; } /** * Financial metric */ export interface FinancialMetric { /** Metric label */ label: string; /** Metric value */ value: number; /** Metric status */ status: 'Strong' | 'Good' | 'Adequate' | 'Weak'; } /** * Risk rating analysis */ export interface RiskRatingAnalysis { /** Overall risk level */ overallRisk: 'Low Risk' | 'Medium Risk' | 'High Risk'; /** Risk score */ riskScore: number; /** Probability of Default */ pd: number; /** Recommendation */ recommendation: string; /** Risk factors */ riskFactors: RiskFactor[]; /** Financial metrics */ financialMetrics: FinancialMetric[]; } /** * CRANK checker details */ export interface CrankCheckerDetails { /** CRANK score */ crankScore: number; /** CRANK grade */ crankGrade: string; /** CRANK remarks */ crankRemarks: string; } /** * Risk assessment rating */ export interface RiskAssessmentRating { /** ICRA risk assessment */ icraRiskAssessmentDetails: RiskDetails; /** CRISIL score */ crisilScore: string; /** Risk assessment details */ riskAssessmentDetails: RiskDetails; /** CRANK checker details */ crankCheckerDetails: CrankCheckerDetails; } /** * Corpositary details */ export interface CorpositoryDetails { /** Corpositary score */ corpositoryScore: number; /** Corpositary grade */ corpositoryGrade: string; /** Corpositary remarks */ corpositoryRemarks: string; } /** * Early warning signals */ export interface EarlyWarningSignals { /** EWS score */ ewsScore: number; /** EWS grade */ ewsGrade: string; /** EWS remarks */ ewsRemarks: string; } /** * EWS dashboard data */ export interface EwsDashboard { /** Early warning signals */ earlyWarningSignals: EarlyWarningSignals; } /** * Complete loan summary details */ export interface LoanSummaryDetails { /** Borrower information */ borrowerInformation: BorrowerInformation; /** Company director information */ companyDirectorInformation: DirectorInformation[]; /** Loan facility information */ loanFacilityInformation: LoanFacilityInformation[]; /** Credit summary */ creditSummary: CreditSummary; /** GST summary */ gstSummary: GstSummary; /** Balance sheet summary */ balanceSheetSummary: BalanceSheetSummary; /** Risk assessment rating */ riskAssessmentRating: RiskAssessmentRating; /** Corpositary details */ corpositoryDetails: CorpositoryDetails; /** EWS dashboard */ ewsDashboard: EwsDashboard; /** Risk rating analysis */ riskRatingAnalysis: RiskRatingAnalysis; } /** * Loan summary API response */ export interface LoanSummaryResponse { /** Loan summary details */ loanSummaryDetails: LoanSummaryDetails; } /** * Borrower information from proposal */ export interface ProposalBorrowerInfo { /** Company name */ CompanyName: string; /** Corporate Identification Number */ CIN: string; /** Director Identification Number */ DIN: string; /** Date of incorporation */ dateOfIncorporation: string; /** PAN number */ Pan: string; /** GST number */ Gst: string; /** Address (optional) */ address?: string; } /** * Director information from proposal */ export interface ProposalDirectorInfo { /** Director name */ directorName: string; /** Director Identification Number */ DIN: string; /** PAN number */ PAN: string; /** Posting/Role */ posting: string; } /** * Facility information from proposal */ export interface ProposalFacilityInfo { /** Facility name */ facilityName: string; /** Nature of limit */ natureOfLimit: string; /** Tenure */ tenure: string; /** Amount requested */ amountRequested: string | number; } /** * Document attached to a proposal */ export interface ProposalDocument { /** Document unique identifier */ documentId: string; /** Document name (gst, cibil, fin) */ documentName: 'gst' | 'cibil' | 'fin' | string; /** Document type (pdf, json, etc.) */ documentType: string; } /** * Loan proposal */ export interface Proposal { /** Proposal number (unique identifier) */ proposalNo: string; /** Borrower name */ borrowerName: string; /** Loan type */ loanType: string; /** Amount requested */ amountRequested: number; /** Proposal status */ status: 'Pending' | 'Under Review' | 'Approved' | 'Rejected' | string; /** Submission date */ submissionDate: string; /** Assigned underwriter */ assignedTo?: string; /** Documents attached to the proposal */ documents: ProposalDocument[]; /** Whether AI settings configuration is allowed */ isAiSettingsConfigurable?: boolean; /** Borrower information */ borrowerInfo?: ProposalBorrowerInfo; /** Director information array */ directorInfo?: ProposalDirectorInfo[]; /** Facility information array */ facilityInfo?: ProposalFacilityInfo[]; } /** * Summary service configuration */ export interface SummaryService { /** Service ID */ id: string; /** Service name */ name: string; /** Service description */ description: string; /** Icon name */ icon: string; /** Service category */ category: 'essential' | 'additional'; /** Whether service is selected */ selected: boolean; } /** * Decision factor */ export interface DecisionFactor { /** Factor name */ name: string; /** Factor status */ status: 'pass' | 'fail' | 'warning'; /** Factor value */ value: string; /** Factor weight */ weight: number; } /** * Go/No-Go decision */ export interface GoNoGoDecision { /** Decision outcome */ decision: 'GO' | 'NO-GO' | 'REVIEW'; /** Decision score */ score: number; /** Decision factors */ factors: DecisionFactor[]; /** Remarks */ remarks: string; } /** * Bureau loan detail from package test */ export interface BureauLoanDetail { lender: string | number; loan_type: string | number; sanctioned_amount: string | number; outstanding_amount: string | number; dpd: string | number; status: string | number; } /** * Bureau data from package test API */ export interface BureauData { cibil_score: string | number; cibil_remarks: string | number; total_accounts: string | number; active_accounts: string | number; credit_utilization: string | number; ontime_payments: string | number; delayed_payments: string | number; defaulted_payments: string | number; last_30_days_credit_enquiries: string | number; last_90_days_credit_enquiries: string | number; last_6_months_credit_enquiries: string | number; loan_details: BureauLoanDetail[]; } /** * Package test API response */ export interface PackageTestResponse { status: string; request_id: string; bureau_data: BureauData; processing_time_ms: number; cached?: boolean; }