bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
42 lines
1.5 KiB
Rust
42 lines
1.5 KiB
Rust
use aamos_core::{LedgerResult, Money, TenantId};
|
|
use chrono::NaiveDate;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
pub mod nordea;
|
|
pub mod revolut;
|
|
|
|
// ── Banktransaktion ───────────────────────────────────────────────────────
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct BankTransaction {
|
|
pub transaction_id: String,
|
|
pub account_number: String,
|
|
pub transaction_date: NaiveDate,
|
|
pub description: String,
|
|
pub amount: Money,
|
|
pub currency: String,
|
|
pub reference: Option<String>,
|
|
pub counterparty: Option<String>,
|
|
pub raw_data: serde_json::Value,
|
|
}
|
|
|
|
// ── Bankimport-trait ──────────────────────────────────────────────────────
|
|
#[async_trait::async_trait]
|
|
pub trait BankImporter: Send + Sync {
|
|
async fn fetch_transactions(
|
|
&self,
|
|
tenant_id: &TenantId,
|
|
account_number: &str,
|
|
from_date: NaiveDate,
|
|
to_date: NaiveDate,
|
|
) -> LedgerResult<Vec<BankTransaction>>;
|
|
}
|
|
|
|
// ── Importresultat ────────────────────────────────────────────────────────
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct ImportResult {
|
|
pub imported_count: usize,
|
|
pub skipped_count: usize,
|
|
pub failed_count: usize,
|
|
pub transactions: Vec<BankTransaction>,
|
|
}
|