Implement classification redesign

This commit is contained in:
Lars Nolden
2026-09-11 22:46:17 +02:00
parent cc43a2f9a7
commit 87f052a3ea
23 changed files with 1602 additions and 296 deletions
+37 -1
View File
@@ -51,6 +51,7 @@ export interface Facts {
export interface Provenance {
source: string;
model?: string;
confidence?: "high" | "medium" | "low" | string;
timestamp?: string;
error?: string;
}
@@ -71,10 +72,12 @@ export interface Category {
name: string;
parent_id?: string;
kind: string;
hint?: string;
}
export interface Tag {
id: string;
name: string;
hint?: string;
}
export interface Merchant {
id: string;
@@ -133,7 +136,7 @@ export interface State {
};
settings: {
model: string;
include_amount: boolean;
private_names: string[];
classify_on_import: boolean;
};
sessions: { session_id: string; valid_until: string; accounts: Account[] }[];
@@ -185,6 +188,39 @@ export interface Preview {
unchanged: number;
errors: { id: string; error: string }[];
}
export interface ProposedCategory {
name: string;
parent?: string;
kind: string;
hint?: string;
because: string[];
}
export interface ProposedTag {
name: string;
hint?: string;
}
export interface ProposedMerchant {
name: string;
aliases: string[];
}
export interface TaxonomyProposal {
categories: ProposedCategory[];
tags: ProposedTag[];
merchants: ProposedMerchant[];
}
export interface TaxonomyPreview {
id: string;
revision: string;
sample: {
date: string;
amount: string;
currency: string;
kind: string;
description: string;
counterparty: string;
}[];
proposal: TaxonomyProposal;
}
export interface CSVColumn {
field: string;
column: string;