first commit

This commit is contained in:
Mateusz Gruszczyński
2026-04-05 13:40:27 +02:00
commit 9a6e77a5fc
89 changed files with 18276 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
export interface User {
id: string;
fullName: string;
email: string;
role: 'ADMIN' | 'USER';
isActive: boolean;
defaultCurrency: string;
reportPreferences?: ReportPreferences;
createdAt: string;
}
export interface Category {
id: string;
name: string;
color: string;
isSystem: boolean;
ownerId: string | null;
}
export interface Merchant {
id: string;
name: string;
kind: 'MERCHANT' | 'SERVICE_PROVIDER' | 'OTHER';
notes: string | null;
isActive: boolean;
createdAt: string;
updatedAt: string;
}
export interface Proof {
id: string;
type: 'RECEIPT' | 'INVOICE' | 'NOTE' | 'BANK_STATEMENT' | 'OTHER';
label: string | null;
note: string | null;
originalName: string | null;
mimeType: string | null;
fileSize: number | null;
fileUrl: string | null;
createdAt: string;
}
export interface Expense {
id: string;
title: string;
description: string | null;
amount: number;
expenseDate: string;
merchant: string | null;
paymentMethod: 'CARD' | 'CASH' | 'TRANSFER' | 'BLIK' | 'OTHER' | null;
currency: string;
possibleDuplicate: boolean;
category: Category;
proofs: Proof[];
createdAt: string;
updatedAt: string;
}
export interface StatsResponse {
total: number;
count: number;
average: number;
topCategory: { categoryId: string; categoryName: string; total: number; count: number } | null;
byCategory: Array<{ categoryId: string; categoryName: string; total: number; count: number }>;
timeline: Array<{ label: string; total: number }>;
}
export interface AppSettings {
id: string;
appName: string;
defaultCurrency: string;
registrationEnabled: boolean;
allowedProofTypes: string[];
uiPreferences: Record<string, string | number | boolean>;
smtpEnabled: boolean;
smtpHost: string | null;
smtpPort: number;
smtpSecure: boolean;
smtpUser: string | null;
smtpPassword: string | null;
smtpFromName: string | null;
smtpFromEmail: string | null;
createdAt: string;
updatedAt: string;
}
export interface ReportPreferences {
enabled: boolean;
frequency: 'monthly' | 'yearly' | 'threshold';
thresholdAmount: number;
sendToEmail: string | null;
categoryIds: string[];
}