import type { Transaction } from "@/sparebank1.ts" import type { TransactionEntity } from "@actual-app/api/@types/loot-core/types/models" import type { UUID } from "node:crypto" // TODO more fields / correct fields? export function transactionIntoActualTransaction( transaction: Transaction, accountId: UUID, ): TransactionEntity { return { id: transaction.id, account: accountId, amount: transaction.amount, date: transaction.date, payee: transaction.description, } } // TODO take the account from the bank and match it to the actual account // Use ENV export function bankAccountIntoActualAccount(account: string): string { throw new Error("Not implemented") }