Files
simplescan-solo/src/types.ts
T

54 lines
983 B
TypeScript

export interface Receipt {
id: string;
title: string;
amount: number;
currency: string;
category: TaxCategory;
date: string; // ISO date
vendor: string;
notes: string;
imageDataUrl?: string;
source: 'manual' | 'email' | 'upload' | 'camera';
createdAt: string;
}
export type TaxCategory =
| 'equipment'
| 'home_office'
| 'software'
| 'internet_phone'
| 'travel'
| 'meals'
| 'professional_services'
| 'marketing'
| 'education'
| 'other';
export interface CategoryInfo {
id: TaxCategory;
label: string;
description: string;
icon: string;
}
export interface EmailReceiptHint {
subject: string;
sender: string;
date: string;
amount?: number;
currency?: string;
vendor?: string;
}
export interface AppSettings {
defaultCurrency: string;
taxYear: string;
ownerName: string;
}
export const DEFAULT_SETTINGS: AppSettings = {
defaultCurrency: 'USD',
taxYear: new Date().getFullYear().toString(),
ownerName: '',
};