Invoice fix and new inbound invoice extension etc

This commit is contained in:
Jakob Wennberg
2026-02-21 17:41:14 +01:00
parent 43172751e9
commit 59d935f2cc
41 changed files with 4698 additions and 720 deletions
+30
View File
@@ -1270,6 +1270,36 @@ export interface SIEAccountMapping {
updated_at: string
}
// ============================================================
// Invoice Inbox Types
// ============================================================
export type InboxItemStatus = 'pending' | 'processing' | 'ready' | 'confirmed' | 'rejected' | 'error'
export type InboxItemSource = 'email' | 'upload'
export interface InvoiceInboxItem {
id: string
user_id: string
status: InboxItemStatus
source: InboxItemSource
email_from: string | null
email_subject: string | null
email_received_at: string | null
document_id: string | null
extracted_data: Record<string, unknown> | null
confidence: number | null
matched_supplier_id: string | null
created_supplier_invoice_id: string | null
error_message: string | null
created_at: string
updated_at: string
// Relations (populated when fetched)
document?: DocumentAttachment
supplier?: Supplier
supplier_invoice?: SupplierInvoice
}
// ============================================================
// Receipt Types (canonical source: extensions/receipt-ocr/types.ts)
// ============================================================