🎉 Allow syncing multiple accounts at once
All checks were successful
Deploy application / deploy (push) Successful in 3s

- By defining multiple account keys in the .env, will fetch from all and upload to correct account
- If transaction id is 0, will not be marked as cleared
- Added accountKey to Transaction interface
This commit is contained in:
2025-02-02 12:37:43 +01:00
parent 14257fa058
commit 75ad4946d2
6 changed files with 56 additions and 37 deletions

View File

@ -12,13 +12,14 @@ import logger from "@/logger.ts"
export interface Actual {
importTransactions: (
accountId: UUID,
transactions: ReadonlyArray<ActualTransaction>,
transactions: Iterable<ActualTransaction>,
) => Promise<ImportTransactionsResponse>
shutdown: () => Promise<void>
}
export interface ActualTransaction extends TransactionEntity {
account: UUID
payee_name?: string
}
@ -51,7 +52,7 @@ export class ActualImpl implements Actual {
async importTransactions(
accountId: UUID,
transactions: ReadonlyArray<ActualTransaction>,
transactions: Iterable<ActualTransaction>,
): Promise<ImportTransactionsResponse> {
return actual.importTransactions(accountId, transactions)
}