refactor(nestjs): hook up new endpoints

This commit is contained in:
Ahmed Bouhuolia
2025-05-16 01:41:11 +02:00
parent ecb80b2cf2
commit 4de1ef71ca
23 changed files with 644 additions and 38 deletions

View File

@@ -4,9 +4,11 @@ import { CreateBankTransactionService } from './commands/CreateBankTransaction.s
import { GetBankTransactionService } from './queries/GetBankTransaction.service';
import {
IBankAccountsFilter,
ICashflowAccountTransactionsQuery,
} from './types/BankingTransactions.types';
import { GetBankAccountsService } from './queries/GetBankAccounts.service';
import { CreateBankTransactionDto } from './dtos/CreateBankTransaction.dto';
import { GetBankAccountTransactionsService } from './queries/GetBankAccountTransactions/GetBankAccountTransactions.service';
@Injectable()
export class BankingTransactionsApplication {
@@ -15,6 +17,7 @@ export class BankingTransactionsApplication {
private readonly deleteTransactionService: DeleteCashflowTransaction,
private readonly getCashflowTransactionService: GetBankTransactionService,
private readonly getBankAccountsService: GetBankAccountsService,
private readonly getBankAccountTransactionsService: GetBankAccountTransactionsService,
) {}
/**
@@ -37,6 +40,16 @@ export class BankingTransactionsApplication {
);
}
/**
* Retrieves the bank transactions of the given bank id.
* @param {ICashflowAccountTransactionsQuery} query
*/
public getBankAccountTransactions(query: ICashflowAccountTransactionsQuery) {
return this.getBankAccountTransactionsService.bankAccountTransactions(
query,
);
}
/**
* Retrieves specific cashflow transaction.
* @param {number} cashflowTransactionId