Files
brazil-swift-ops/packages/rules-engine/src/aml.d.ts
defiQUG ecb1bb148e Fix all placeholders and hardcoded values
- Make transactionId and batchId required parameters in E&O uplift functions
- Move BIC code to configurable institution-config in utils package
- Update effective dates to use current date instead of hardcoded 2024-01-01
- Add placeholder review documentation
- Comment out console.log in retention policy (production TODO)
- All critical placeholders resolved
2026-01-23 16:15:48 -08:00

42 lines
1.6 KiB
TypeScript

/**
* AML (Anti-Money Laundering) and anti-structuring detection
*/
import type { Transaction, AMLCheckResult, SingleTransactionAMLResult, StructuringCheckResult, RuleResult } from '@brazil-swift-ops/types';
/**
* Transaction history for structuring detection (in production, this would be a database)
*/
interface TransactionHistory {
transactionId: string;
amount: number;
currency: string;
usdEquivalent: number;
date: Date;
orderingCustomerTaxId?: string;
beneficiaryTaxId?: string;
}
declare class TransactionHistoryStore {
private history;
add(entry: TransactionHistory): void;
getByDateRange(startDate: Date, endDate: Date): TransactionHistory[];
getByCustomer(taxId: string, startDate: Date, endDate: Date): TransactionHistory[];
getAll(): TransactionHistory[];
}
export declare function getHistoryStore(): TransactionHistoryStore;
/**
* Check single transaction AML threshold
*/
export declare function checkSingleTransactionAML(transaction: Transaction): SingleTransactionAMLResult;
/**
* Check for structuring patterns (multiple small transactions that sum above threshold)
*/
export declare function checkStructuring(transaction: Transaction, historicalTransactions?: TransactionHistory[]): StructuringCheckResult | undefined;
/**
* Perform complete AML check
*/
export declare function performAMLCheck(transaction: Transaction, historicalTransactions?: TransactionHistory[]): AMLCheckResult;
/**
* Create rule result for AML check
*/
export declare function createAMLRuleResult(check: AMLCheckResult): RuleResult;
export {};
//# sourceMappingURL=aml.d.ts.map