import { AnalysisAlerts, UsageType, AccountType, BanksUserTransactionType, BanksUserStatus, LoanAccountType, RegularCashFlowConfiguration } from './Algoan.enum'; export interface IBanksUser { id: string; status: BanksUserStatus; redirectUrl: string; redirectUrlCreatedAt: number; redirectUrlTTL: number; callbackUrl?: string; plugIn?: PlugIn; scores: Score[]; analysis?: Analysis; adenTriggers?: AdenTriggers; partnerId?: string; aden?: Aden; } export interface PlugIn { budgetInsightBank?: { baseUrl: string; token: string; clientId: string; }; } export interface AdenTriggers { onSynchronizationFinished?: boolean; bankreaderLinkRequired?: boolean; bankreaderConfigurationRequired?: boolean; } export interface Score { createdAt: string; score: number; type: string; version: string; } export interface Analysis { alerts?: AnalysisAlerts[]; regularCashFlows?: RegularCashFlow[]; reliability?: ReliabilityStatus; } export interface RegularCashFlow { amount: number; category: { frequency: number; name: string; }; configuration: RegularCashFlowConfiguration; homogeneity: number; } export declare type ReliabilityStatus = 'LOW' | 'MEDIUM' | 'HIGH'; export interface BanksUserAccount { id: string; balance: number; balanceDate: string; connectionSource: string; currency: string; type: AccountType; usage: UsageType; bank?: string; bic?: string; iban?: string; loanDetails?: LoanDetails; name?: string; reference?: string; savingsDetails?: string; status?: 'MANUAL' | 'ACTIVE' | 'ERROR' | 'NOT_FOUND' | 'CLOSED'; number?: string; } export interface BanksUserAccountWithTransactions extends BanksUserAccount { transactions: BanksUserTransaction[]; } export interface LoanDetails { amount: number; debitedAccountId?: string; endDate: number; interestRate: number; payment: number; remainingCapital: number; startDate: number; type: LoanAccountType; } export interface BanksUserTransaction { id: string; amount: number; category: string; date: string; description: string; type: BanksUserTransactionType; banksUserCardId?: string; currency?: string; reference?: string; simplifiedDescription?: string; userDescription?: string; } export interface Aden { budget: Budget; bureau: Bureau; dataQuality: DataQuality; score: ScoreResult; } interface Bureau { credit: { loans: Loan; locDrawDowns: Loan; }; events: { bankAccountSeizure: boolean; thirdPartyHolderNotice: boolean; wageAdvances: AmountCount; }; gambling: AmountCount; incidents: { checkRejections: AmountCount; fees: AmountCount; paymentRejections: AmountCount; }; overdraft: { fees: AmountCount; hard: number; max: number; total: number; }; } interface Budget { cashflows: Cashflow[]; indicators: { allowancesRatio: number; debtToIncome: number; residualIncome: number; }; } interface DataQuality { calendar: { month: number; nbDays: number; }; historicalDepth: number; lastTransactionGap: number; numberOfCheckings: number; numberOfCreditCards: number; numberOfLoans: number; numberOfSavings: number; transactionsFrequency: number; } interface ScoreResult { indicators: { cash: number; lifestyle: number; savings: number; }; score: number; } interface Cashflow { calendar: { amount: number; month: number; }[]; dueDay?: number; label?: string; monthlyAmount: number; nbTransactions: number; references: string[]; totalAmount: number; type: string; } interface AmountCount { amount: number; count: number; } interface Loan extends AmountCount { nbLenders: number; } export {};