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

@@ -3,16 +3,39 @@ import { DisconnectBankAccountService } from './commands/DisconnectBankAccount.s
import { RefreshBankAccountService } from './commands/RefreshBankAccount.service';
import { ResumeBankAccountFeedsService } from './commands/ResumeBankAccountFeeds.service';
import { PauseBankAccountFeeds } from './commands/PauseBankAccountFeeds.service';
import { GetBankAccountsService } from './queries/GetBankAccounts';
import { ICashflowAccountsFilter } from './types/BankAccounts.types';
import { GetBankAccountSummary } from './queries/GetBankAccountSummary';
@Injectable()
export class BankAccountsApplication {
constructor(
private disconnectBankAccountService: DisconnectBankAccountService,
private readonly getBankAccountsService: GetBankAccountsService,
private readonly getBankAccountSummaryService: GetBankAccountSummary,
private readonly disconnectBankAccountService: DisconnectBankAccountService,
private readonly refreshBankAccountService: RefreshBankAccountService,
private readonly resumeBankAccountFeedsService: ResumeBankAccountFeedsService,
private readonly pauseBankAccountFeedsService: PauseBankAccountFeeds,
) {}
/**
* Retrieves the bank accounts.
* @param {ICashflowAccountsFilter} filterDto -
*/
getBankAccounts(filterDto: ICashflowAccountsFilter) {
return this.getBankAccountsService.getCashflowAccounts(filterDto);
}
/**
* Retrieves the given bank account summary.
* @param {number} bankAccountId
*/
getBankAccountSumnmary(bankAccountId: number) {
return this.getBankAccountSummaryService.getBankAccountSummary(
bankAccountId,
);
}
/**
* Disconnects the given bank account.
* @param {number} bankAccountId - Bank account identifier.