import * as plugins from './plugins.js'; import { Account } from './skr.classes.account.js'; import { JournalEntry } from './skr.classes.journalentry.js'; import type { TDatabaseConfig, TSKRType, IAccountData, IAccountFilter, ITransactionFilter, ITransactionData, ITransactionView, IJournalEntry } from './skr.types.js'; export declare class ChartOfAccounts { private config?; private logger; private initialized; private skrType; constructor(config?: TDatabaseConfig | undefined); /** * Initialize the database connection */ init(): Promise; /** * Initialize SKR03 chart of accounts */ initializeSKR03(): Promise; /** * Initialize SKR04 chart of accounts */ initializeSKR04(): Promise; /** * Get the current SKR type */ getSKRType(): TSKRType | null; /** * Set the active SKR type */ setSKRType(skrType: TSKRType): void; /** * Get account by number */ getAccountByNumber(accountNumber: string): Promise; /** * Get accounts by class */ getAccountsByClass(accountClass: number): Promise; /** * Get accounts by type */ getAccountsByType(accountType: IAccountData['accountType']): Promise; /** * Create a custom account */ createCustomAccount(accountData: Partial): Promise; /** * Declare an individual account of the books (Individualkonto) on a number * DATEV leaves free after the account it belongs to. @fin.cx/chartdata * checks it together with the individual accounts already declared and * refuses it with its `IndividualAccountsError` (`problems`); nothing is * stored then. The account takes its parent's type. */ declareIndividualAccount(declaration: plugins.chartdata.IIndividualAccountDeclaration): Promise; /** * The declarations of the books' individual accounts, by account number: * what `IAccountPolicy.individualAccounts` takes. */ getIndividualAccounts(): Promise; /** * Update an existing account */ updateAccount(accountNumber: string, updates: Partial): Promise; /** * Delete a custom account (only non-system accounts) */ deleteAccount(accountNumber: string): Promise; /** * Search accounts */ searchAccounts(searchTerm: string): Promise; /** * Get all accounts */ getAllAccounts(filter?: IAccountFilter): Promise; /** * Post a simple transaction as a hashed two-line journal entry. */ postTransaction(transactionData: ITransactionData): Promise; /** * Post a journal entry on the hashed journal. */ postJournalEntry(journalData: IJournalEntry): Promise; /** * Get per-line transaction views for an account. */ getAccountTransactions(accountNumber: string): Promise; /** * Get transaction views (two-line entries) by filter. */ getTransactions(filter?: ITransactionFilter): Promise; /** * Reverse a transaction via Storno; the original is never mutated (GoBD). */ reverseTransaction(transactionId: string): Promise; private requireSkrType; /** * Get account class description */ getAccountClassDescription(accountClass: number): string; /** * Import accounts from CSV */ importAccountsFromCSV(csvContent: string): Promise; /** * Export accounts to CSV */ exportAccountsToCSV(): Promise; /** * Close the database connection */ close(): Promise; }