import { Amount, Currency } from '../../commonStateTypes/amount'; import { ID } from '../../commonStateTypes/common'; import { MonthYearPeriod } from '../../commonStateTypes/timePeriod'; import { ZeniDate } from '../../zeniDayJS'; import { MerchantType, TransactionDirectionType } from '../transaction/stateTypes/reconciliationTransaction'; import { TransactionType } from '../transaction/stateTypes/transactionType'; export declare const toRecommendedActionCodeType: (v: string) => "record_expense" | "record_deposit" | "record_transfer" | "record_bill_payment" | "record_cc_payment" | "record_cc_credit"; export type RecommendedActionCodeType = ReturnType; export declare const toReconciliationStatusCodeType: (v: string) => "pending" | "in_progress" | "save_for_later" | "reconciled" | "reconciled_on_qbo" | "failed"; export type ReconciliationStatusCodeType = ReturnType; export declare const toBalanceDataStatusCodeType: (v: string) => "in_progress" | "not_found" | "completed"; export type BalanceDataStatusCodeType = ReturnType; export declare const toBankStatusCodeType: (v: string) => "not_found" | "connected" | "not_connected" | "reconnect"; export type BankStatusCodeType = ReturnType; export declare const toStatementDataStatusCodeType: (v: string) => "not_connected" | "parsing" | "parsing_failed" | "validated" | "validation_failed" | "processed" | "processing_failed" | "parsed_awaiting_mapping" | "deleting" | "deleted"; export type StatementDataStatusCodeType = ReturnType; export declare const toStatementStatusCodeType: (v: string) => "not_found" | "uploaded"; export type StatementStatusCodeType = ReturnType; export declare const toAccountReconKey: (accountId: ID, selectedPeriod: MonthYearPeriod) => string; export type AccountReconKey = ReturnType; export interface LastReconciledByUser { userEmail: string; userId: ID; } export interface LastReconciled { at: ZeniDate; by: LastReconciledByUser; forPeriodEndDate: ZeniDate; } export interface MatchProgress { aiPercentageShare: number; completePercentage: number; humanPercentageShare: number; matched: number; remainingPercentage: number; total: number; } export interface AccountReconState { accountReconByAccountReconKey: Record; } export interface AccountReconciliationData { accountId: ID; currency: Currency; endDate: ZeniDate; startDate: ZeniDate; statementStatus: { code: StatementStatusCodeType; label: string; }; transactionsToReconcile: ID[]; transactionsToReview: TransactionsToReview[]; accountUpdatedAt?: ZeniDate; autoMatchedCount?: number; balanceDataStatus?: { code: BalanceDataStatusCodeType; label: string; }; bankBalance?: Amount; clearedBalance?: Amount; errorMessage?: { errorDetails: string; errorShort: string; }; initialClearedBalance?: Amount; lastReconciled?: LastReconciled; matchProgress?: MatchProgress; needsReview?: number; openingBalance?: Amount; reconciliationId?: ID; reconciliationStatus?: { code: ReconciliationStatusCodeType; label: string; }; reconUpdatedAt?: ZeniDate; statementDataStatus?: { code: StatementDataStatusCodeType; label: string; }; statementMetaData?: { combinedStatementGroupId?: string; fileId?: ID; isCombinedStatement?: boolean; isCombinedStatementAnchor?: boolean; statementUploadId?: ID; }; userId?: ID; variance?: Amount; variancePercentage?: number; } export interface TransactionsToReview { amount: Amount; memo: string; recommendedAction: RecommendedAction; status: string; transactionDate: ZeniDate; transactionDirection: TransactionDirectionType; transactionId: ID; merchantId?: ID; merchantName?: string; merchantType?: MerchantType; } export interface RecommendedAction { action: RecommendedActionCodeType; plaidConfidenceScore: string | null; reason: string; recommendedTransactions: RecommendedReviewTransaction[]; zeniConfidenceScore: number | null; } export interface RecommendedReviewTransaction { amount: Amount; confidenceScore: number; date: ZeniDate; memo: string; recommendedReasons: string[]; accountId?: ID; bookTransactionId?: ID; classId?: ID; merchantId?: ID; merchantName?: string; merchantType?: MerchantType; transactionId?: ID; transactionType?: TransactionType; typeName?: string; }