From 13682e2d43864caae8b4f0603bc8daf5e4d4ef31 Mon Sep 17 00:00:00 2001 From: admin-valentin Date: Fri, 31 Jul 2026 16:34:22 +0000 Subject: [PATCH] feat(api): add Goal and Transaction types --- src/lib/api.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/lib/api.ts b/src/lib/api.ts index 9f9535a..5da4ffa 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -154,3 +154,35 @@ export interface Briefing { }; aiExplanation: string | null; } + +export type GoalStatus = 'not_started' | 'on_track' | 'at_risk' | 'achieved' | 'abandoned'; + +export interface Goal { + id: string; + tenantId: string; + ownerUserId: string; + horizon: string; + metric: string; + target: string; + milestones: unknown[]; + status: GoalStatus; + createdAt: string; + updatedAt: string; +} + +export type EvidenceStatus = 'missing' | 'partial' | 'complete' | 'not_required'; + +export interface Transaction { + id: string; + tenantId: string; + organizationId: string; + type: string; + /** Stored as string from DB (numeric type). */ + amountMinorUnits: string; + currency: string; + transactionDate: string; + evidenceStatus: EvidenceStatus; + source: string | null; + createdAt: string; + updatedAt: string; +}