import { CreateCashFlowParams, DeleteByClientAccountMovementParams, DeleteMovementByPaymentParams, DeleteMovementParams, } from "../CashFlow/CashFlow.Interface"; import { ICashFlowBalanceDocument } from "./CashFlowBalance.Adapter.Mongoose"; export type FindCashFlowBalanceParams = { companyId: string; year: number; month: number; sessionUser: string; }; export type CreateCashFlowBalanceParams = { companyId: string; amount: number; year: number; month: number; updatedAt: Date; }; export type CalculateCashFlowBalanceParams = { companyId: string; year: number; month: number; sessionUser: string; }; export interface ICashFlowBalance { id?: string; companyId: string; amount: number; year: number; month: number; updatedAt: Date; } export interface CashFlowHistoryItem { amount: number; month: number; year: number; } export interface CashFlowHistoryView { companyId: string; data: CashFlowHistoryItem[]; total: number; } export interface ICashFlowBalanceAdapter { create(data: CreateCashFlowBalanceParams): Promise; delete(id: string): Promise; find(filters: FindCashFlowBalanceParams): Promise; findOne(filters: FindCashFlowBalanceParams): Promise; } export interface ICashFlowBalanceManager { balance: ICashFlowBalanceAdapter; createCashFlowMovement(data: CreateCashFlowParams): Promise; calculateBalance(data: CalculateCashFlowBalanceParams): Promise; delete(data: DeleteMovementParams): Promise; deleteByPayment(data: DeleteMovementByPaymentParams): Promise; deleteByClientAccountMovement(data: DeleteByClientAccountMovementParams): Promise; history(data: FindCashFlowBalanceParams): Promise; }