Add missing TransactionSource cases to the TS type

The TS TransactionSource union listed only manually_created and imported, while
App\Enums\TransactionSource (PHP) also has enablebanking and wise. A transaction
synced from Enable Banking or Wise therefore carried a source value outside the
declared union. Add the two missing cases so the client type mirrors the backend
enum. Automatic enum typegen is left as a follow-up (would touch the
parallel-owned index.d.ts).
This commit is contained in:
Víctor Falcón 2026-07-04 20:33:12 +02:00
parent b8928234ae
commit f02cf7cd74
1 changed files with 6 additions and 1 deletions

View File

@ -3,7 +3,12 @@ import { type Category } from './category';
import { type Label } from './label';
import { UUID } from './uuid';
export type TransactionSource = 'manually_created' | 'imported';
// Mirrors App\Enums\TransactionSource (PHP). Keep both in sync.
export type TransactionSource =
| 'manually_created'
| 'imported'
| 'enablebanking'
| 'wise';
export type CategorySource = 'manual' | 'rule' | 'ai' | 'bank';