Claude experiments

This commit is contained in:
Elisiário Couto
2025-09-08 18:48:45 +01:00
committed by Elisiário Couto
parent 46f3f5c498
commit 26487cff89
26 changed files with 6054 additions and 1 deletions

80
frontend/src/types/api.ts Normal file
View File

@@ -0,0 +1,80 @@
export interface Account {
id: string;
name: string;
bank_name: string;
account_type: string;
currency: string;
balance?: number;
iban?: string;
created_at: string;
updated_at: string;
}
export interface Transaction {
id: string;
internal_id?: string;
account_id: string;
amount: number;
currency: string;
description: string;
transaction_date: string;
booking_date?: string;
value_date?: string;
creditor_name?: string;
debtor_name?: string;
reference?: string;
category?: string;
created_at: string;
updated_at: string;
}
// Type for raw transaction data from API (before sanitization)
export interface RawTransaction {
id?: string;
internal_id?: string;
account_id?: string;
amount?: number;
currency?: string;
description?: string;
transaction_date?: string;
booking_date?: string;
value_date?: string;
creditor_name?: string;
debtor_name?: string;
reference?: string;
category?: string;
created_at?: string;
updated_at?: string;
}
export interface Balance {
id: string;
account_id: string;
balance_amount: number;
balance_type: string;
currency: string;
reference_date: string;
created_at: string;
updated_at: string;
}
export interface Bank {
id: string;
name: string;
country_code: string;
logo_url?: string;
}
export interface ApiResponse<T> {
data: T;
message?: string;
status: string;
}
export interface PaginatedResponse<T> {
data: T[];
total: number;
page: number;
per_page: number;
total_pages: number;
}